void handle_accept(session_ptr new_session,
     const asio::error_code& error)
 {
   if (!error)
   {
     new_session->start();
     new_session.reset(new session(io_service_));
     acceptor_.async_accept(new_session->socket(),
         boost::bind(&server::handle_accept, this, new_session,
           asio::placeholders::error));
   }
 }
예제 #2
0
	void handle_accept(session_ptr new_session,
		const boost::system::error_code& error)
	{
		if (!error)
		{
			new_session->start();
			new_session.reset(new session(io_service_work_pool_.get_io_service(), io_service_pool_.get_io_service()));
			acceptor_.async_accept(new_session->socket(),
				boost::bind(&server::handle_accept, this, new_session,
				boost::asio::placeholders::error));
		}
	}