#ifndef TCPSERVER_H #define TCPSERVER_H #include #include #include "connection.h" class TCPServer { private: boost::asio::ip::tcp::acceptor acceptor_; boost::function connect_callback; //! Listen for incoming connection. void listen(); //! Handle new connection. void handle_connection(Connection::p connection, const boost::system::error_code& error); public: TCPServer(boost::asio::io_service& io_service); void get_connection(boost::function f); }; #endif