1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-12 02:28:11 +02:00

Replaced io_service()) with get_io_service(). Fixes bug #780.

This commit is contained in:
Frank Zago 2011-08-04 23:49:32 +00:00
parent 18a376696d
commit 56bf3dc8ab
2 changed files with 6 additions and 6 deletions

View File

@ -137,7 +137,7 @@ connerror1:
throw std::string("Can't establish connection :(");
}
CConnection::CConnection(TSocket * Socket, std::string Name )
:socket(Socket),io_service(&Socket->io_service()), name(Name)//, send(this), rec(this)
:socket(Socket),io_service(&Socket->get_io_service()), name(Name)//, send(this), rec(this)
{
init();
}

View File

@ -152,8 +152,8 @@ void CPregameServer::run()
if(acceptor)
{
acceptor->io_service().reset();
acceptor->io_service().poll();
acceptor->get_io_service().reset();
acceptor->get_io_service().poll();
}
} //frees lock
@ -214,7 +214,7 @@ void CPregameServer::start_async_accept()
assert(!upcomingConnection);
assert(acceptor);
upcomingConnection = new TSocket(acceptor->io_service());
upcomingConnection = new TSocket(acceptor->get_io_service());
acceptor->async_accept(*upcomingConnection, boost::bind(&CPregameServer::connectionAccepted, this, boost::asio::placeholders::error));
}
@ -398,7 +398,7 @@ void CVCMIServer::start()
boost::system::error_code error;
tlog0<<"Listening for connections at port " << acceptor->local_endpoint().port() << std::endl;
tcp::socket * s = new tcp::socket(acceptor->io_service());
tcp::socket * s = new tcp::socket(acceptor->get_io_service());
boost::thread acc(boost::bind(vaccept,acceptor,s,&error));
sr->setToTrueAndNotify();
delete mr;
@ -482,7 +482,7 @@ void CVCMIServer::loadGame()
}
else
{
tcp::socket * s = new tcp::socket(acceptor->io_service());
tcp::socket * s = new tcp::socket(acceptor->get_io_service());
acceptor->accept(*s,error);
if(error) //retry
{