#ifndef IOMANAGER_HPP #define IOMANAGER_HPP #include "global.hpp" #include #include using boost::asio::ip::tcp; class IoManager { protected: boost::asio::io_service ios; tcp::socket *tcpsock; boost::system::error_code errcode; std::string *ipstring; int port; public: // Basic constructor IoManager(char *ipcstring); // destructor to clean up all generic stuff ~IoManager(); // enters loop to handle further interaction based on derived class virtual void run() = 0; // tries to establish connection, returns false on error bool connect(); }; #endif