diff options
Diffstat (limited to 'src/syncTcpConnection.h')
-rw-r--r-- | src/syncTcpConnection.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/syncTcpConnection.h b/src/syncTcpConnection.h index 5af5276..bb0db46 100644 --- a/src/syncTcpConnection.h +++ b/src/syncTcpConnection.h @@ -12,12 +12,16 @@ class SyncTcpConnection { public: typedef boost::shared_ptr<SyncTcpConnection> pointer; + typedef boost::asio::ip::tcp proto; + static pointer create(boost::asio::io_service& io_service) { return pointer(new SyncTcpConnection(io_service)); }; + boost::function<void(SyncTcpConnection *)> onConnect; - boost::asio::ip::tcp::socket& socket(); + proto::socket& socket(); + void start(); void Send(std::string message); private: @@ -25,6 +29,6 @@ private: void handle_write(const boost::system::error_code & /*error*/, size_t /*bytes_transferred*/); - boost::asio::ip::tcp::socket socket_; + proto::socket socket_; }; #endif |