diff --git a/ircbot.pro b/ircbot.pro new file mode 100644 index 0000000..4e2bc61 --- /dev/null +++ b/ircbot.pro @@ -0,0 +1,16 @@ +TEMPLATE = app +CONFIG += console c++11 +CONFIG -= app_bundle +CONFIG -= qt + +SOURCES += \ + main.cpp \ + tcpsyncclient.cpp + +HEADERS += \ + tcpsyncclient.h + +LIBS += \ + -lboost_system-mt \ + -lws2_32 + diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..53b935f --- /dev/null +++ b/main.cpp @@ -0,0 +1,16 @@ +#include +#include "tcpsyncclient.h" + +void usage(std::string argv) +{ + std::cout << argv << "
" << std::endl; +} + +int main(int argc, char * argv[]) +{ + if (argc < 2) usage( std::string(argv[0])); + + boost::asio::io_service service; + TcpSyncClient( std::string(argv[1]), std::string(argv[2])); + return 0; +} diff --git a/tcpsyncclient.cpp b/tcpsyncclient.cpp new file mode 100644 index 0000000..ca189ad --- /dev/null +++ b/tcpsyncclient.cpp @@ -0,0 +1,12 @@ +#include "tcpsyncclient.h" + +TcpSyncClient::TcpSyncClient(std::string a, std::string p) : m_address(a), m_port(p) +{ + this->displayConfig(); +} + +void TcpSyncClient::displayConfig() +{ + std::cout << "Address: " << m_address << std::endl; + std::cout << "Port: " << m_port << std::endl; +} diff --git a/tcpsyncclient.h b/tcpsyncclient.h new file mode 100644 index 0000000..5d9ba75 --- /dev/null +++ b/tcpsyncclient.h @@ -0,0 +1,26 @@ +#ifndef TCPSYNCCLIENT_H +#define TCPSYNCCLIENT_H + +#include +#include +#include +#include +#include +#include +#include + +using namespace boost::placeholders; + +class TcpSyncClient +{ +public: + TcpSyncClient(std::string a, std::string p); + +private: + void displayConfig(); + + std::string m_address; + std::string m_port; +}; + +#endif // TCPSYNCCLIENT_H