mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-26 03:52:01 +02:00
Replaced io_service()) with get_io_service(). Fixes bug #780.
This commit is contained in:
parent
18a376696d
commit
56bf3dc8ab
@ -137,7 +137,7 @@ connerror1:
|
|||||||
throw std::string("Can't establish connection :(");
|
throw std::string("Can't establish connection :(");
|
||||||
}
|
}
|
||||||
CConnection::CConnection(TSocket * Socket, std::string Name )
|
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();
|
init();
|
||||||
}
|
}
|
||||||
|
@ -152,8 +152,8 @@ void CPregameServer::run()
|
|||||||
|
|
||||||
if(acceptor)
|
if(acceptor)
|
||||||
{
|
{
|
||||||
acceptor->io_service().reset();
|
acceptor->get_io_service().reset();
|
||||||
acceptor->io_service().poll();
|
acceptor->get_io_service().poll();
|
||||||
}
|
}
|
||||||
} //frees lock
|
} //frees lock
|
||||||
|
|
||||||
@ -214,7 +214,7 @@ void CPregameServer::start_async_accept()
|
|||||||
assert(!upcomingConnection);
|
assert(!upcomingConnection);
|
||||||
assert(acceptor);
|
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));
|
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;
|
boost::system::error_code error;
|
||||||
tlog0<<"Listening for connections at port " << acceptor->local_endpoint().port() << std::endl;
|
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));
|
boost::thread acc(boost::bind(vaccept,acceptor,s,&error));
|
||||||
sr->setToTrueAndNotify();
|
sr->setToTrueAndNotify();
|
||||||
delete mr;
|
delete mr;
|
||||||
@ -482,7 +482,7 @@ void CVCMIServer::loadGame()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
tcp::socket * s = new tcp::socket(acceptor->io_service());
|
tcp::socket * s = new tcp::socket(acceptor->get_io_service());
|
||||||
acceptor->accept(*s,error);
|
acceptor->accept(*s,error);
|
||||||
if(error) //retry
|
if(error) //retry
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user