From 951d51c32f93d9fb1e6e697843b19b9b698e39a1 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Fri, 8 Jan 2010 02:42:23 +0000 Subject: moved to resolver iterator at onResolve callback functions --- src/syncServer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/syncServer.cpp') diff --git a/src/syncServer.cpp b/src/syncServer.cpp index b61872c..ecf9fb4 100644 --- a/src/syncServer.cpp +++ b/src/syncServer.cpp @@ -42,8 +42,10 @@ SyncServer::SyncServer(std::string localaddr, std::string port, ConnectCallback gResolver.resolveTcp(localaddr, port, boost::bind(&SyncServer::onResolve, this, _1), boost::bind(&SyncServer::onResolvError, this, _1)); } -void SyncServer::onResolve(const SyncTcpConnection::proto::endpoint& e) +void SyncServer::onResolve(const SyncTcpConnection::proto::resolver::iterator& it) { + SyncTcpConnection::proto::endpoint e = *it; + acceptor_.open(e.protocol()); acceptor_.set_option(boost::asio::socket_base::reuse_address(true)); acceptor_.bind(e); -- cgit v1.2.3