diff options
Diffstat (limited to 'Slimber/Server.cpp')
-rw-r--r-- | Slimber/Server.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Slimber/Server.cpp b/Slimber/Server.cpp index 734f3b8..c6e700e 100644 --- a/Slimber/Server.cpp +++ b/Slimber/Server.cpp @@ -37,13 +37,15 @@ Server::Server( int clientConnectionPort, int linkLocalConnectionPort, LinkLocalServiceBrowser* linkLocalServiceBrowser, - VCardCollection* vCardCollection) : + VCardCollection* vCardCollection, + EventLoop* eventLoop) : linkLocalServiceRegistered(false), rosterRequested(false), clientConnectionPort(clientConnectionPort), linkLocalConnectionPort(linkLocalConnectionPort), linkLocalServiceBrowser(linkLocalServiceBrowser), vCardCollection(vCardCollection), + eventLoop(eventLoop), presenceManager(NULL), stopping(false) { linkLocalServiceBrowser->onServiceRegistered.connect( @@ -57,7 +59,7 @@ Server::~Server() { void Server::start() { assert(!serverFromClientConnectionServer); serverFromClientConnectionServer = BoostConnectionServer::create( - clientConnectionPort, &boostIOServiceThread.getIOService()); + clientConnectionPort, &boostIOServiceThread.getIOService(), eventLoop); serverFromClientConnectionServerSignalConnections.push_back( serverFromClientConnectionServer->onNewConnection.connect( boost::bind(&Server::handleNewClientConnection, this, _1))); @@ -67,7 +69,7 @@ void Server::start() { assert(!serverFromNetworkConnectionServer); serverFromNetworkConnectionServer = BoostConnectionServer::create( - linkLocalConnectionPort, &boostIOServiceThread.getIOService()); + linkLocalConnectionPort, &boostIOServiceThread.getIOService(), eventLoop); serverFromNetworkConnectionServerSignalConnections.push_back( serverFromNetworkConnectionServer->onNewConnection.connect( boost::bind(&Server::handleNewLinkLocalConnection, this, _1))); @@ -254,7 +256,7 @@ void Server::handleElementReceived(boost::shared_ptr<Element> element, boost::sh new LinkLocalConnector( *service, linkLocalServiceBrowser->getQuerier(), - BoostConnection::create(&boostIOServiceThread.getIOService()))); + BoostConnection::create(&boostIOServiceThread.getIOService(), eventLoop))); connector->onConnectFinished.connect( boost::bind(&Server::handleConnectFinished, this, connector, _1)); connectors.push_back(connector); |