summaryrefslogtreecommitdiff
path: root/src/syncTcpConnection.h
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2008-11-25 02:13:05 +0000
committerChristian Pointner <equinox@anytun.org>2008-11-25 02:13:05 +0000
commit126e3621fa91a0b5907adc36f2dffc6c81208dc9 (patch)
tree4c86c513fbe8e388ce1aabcf6cf18e752f6ffb51 /src/syncTcpConnection.h
parentfixed readme (diff)
small type cleanup
Diffstat (limited to 'src/syncTcpConnection.h')
-rw-r--r--src/syncTcpConnection.h8
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