~http_sync_server() { error_code ec; ios_.dispatch( [&]{ acceptor_.close(ec); }); thread_.join(); }
/// 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(); }
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() ); }
void stop_accept() { acceptor_.close(); }