示例#1
0
 ~http_sync_server()
 {
     error_code ec;
     ios_.dispatch(
         [&]{ acceptor_.close(ec); });
     thread_.join();
 }
示例#2
0
文件: server.hpp 项目: erlanger/eixx
 /// Handle a request to stop the server.
 virtual void handle_stop() {
     // The server is stopped by cancelling all outstanding asynchronous
     // operations. Once all operations have finished the io_service::run() call
     // will exit.
     m_acceptor.close();
     base_t::handle_stop();
 }
示例#3
0
文件: server.hpp 项目: 0xec/server1
 void Release() {
   acceptor->close();
   delete acceptor;
   (*socket_pptr)->close();
   delete *socket_pptr;
   delete socket_pptr;
 }
	~PrivateData()
	{
		if ( m_success )
		{
			m_acceptor.cancel();
			m_acceptor.close();
			m_thread.join();
		}
	}
 /// Destructor.
 ~server()
 {
     work_ = boost::none;
     ios_.dispatch([&]
         {
             error_code ec;
             acceptor_.close(ec);
         });
     for(auto& t : thread_)
         t.join();
 }
				void close_socket()
				{
					BOOST_CHECK_NO_THROW( socket_.close() );
					BOOST_CHECK_NO_THROW( acceptor_.close() );
				}
示例#7
0
	void stop_accept()
	{
		acceptor_.close();
	}