diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-11-05 22:43:34 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-11-05 22:43:34 +0000 |
| commit | f660fe3f1be97f373318806a77b3ce3fcd53cb73 (patch) | |
| tree | 3d862060843ad00aae4c23008912ba7d21a38ca2 /src/lib/util.h | |
| parent | 5698918140d640b3477634504a83da0d8d71a1cf (diff) | |
Various work on server discovery; works on localhost.
Diffstat (limited to 'src/lib/util.h')
| -rw-r--r-- | src/lib/util.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/util.h b/src/lib/util.h index 351c4c4d9..5e568cc27 100644 --- a/src/lib/util.h +++ b/src/lib/util.h @@ -133,13 +133,15 @@ class Socket { public: Socket (int timeout = 30); + ~Socket (); /** @return Our underlying socket */ boost::asio::ip::tcp::socket& socket () { return _socket; } - void connect (boost::asio::ip::basic_resolver_entry<boost::asio::ip::tcp> const & endpoint); + void connect (boost::asio::ip::tcp::endpoint); + void accept (int); void write (uint32_t n); void write (uint8_t const * data, int size); @@ -155,6 +157,7 @@ private: boost::asio::io_service _io_service; boost::asio::deadline_timer _deadline; boost::asio::ip::tcp::socket _socket; + boost::asio::ip::tcp::acceptor* _acceptor; int _timeout; }; |
