Remove unused strands in server examples

This commit is contained in:
Peter Jankuliak
2017-09-22 11:05:20 +02:00
committed by Vinnie Falco
parent c81558e38b
commit fa4df7eb60
11 changed files with 8 additions and 26 deletions

View File

@@ -137,7 +137,6 @@ public:
// Accepts incoming connections and launches the sessions
class listener : public std::enable_shared_from_this<listener>
{
boost::asio::io_service::strand strand_;
tcp::acceptor acceptor_;
tcp::socket socket_;
@@ -145,8 +144,7 @@ public:
listener(
boost::asio::io_service& ios,
tcp::endpoint endpoint)
: strand_(ios)
, acceptor_(ios)
: acceptor_(ios)
, socket_(ios)
{
boost::system::error_code ec;
@@ -191,10 +189,10 @@ public:
{
acceptor_.async_accept(
socket_,
strand_.wrap(std::bind(
std::bind(
&listener::on_accept,
shared_from_this(),
std::placeholders::_1)));
std::placeholders::_1));
}
void