boost::net::socket::acceptor — Socket acceptor.
template<typename Demultiplexer, typename ConnectionSynchronisation, typename SocketErrorPolicy, typename EventHandler> class acceptor { public: // types typedef acceptor_impl< ConnectionSynchronisation, Demultiplexer, typename Demultiplexer::synchronisation_type, SocketErrorPolicy, EventHandler > base_t; // construct/copy/destruct acceptor(Demultiplexer &); // public member functions template<typename Endpoint> acceptor_error open(const Endpoint &, std::size_t = 1) ; acceptor_error accept() ; template<typename AHandler> void attach(AHandler *) ; void on_accepted(const boost::function< typename net::socket::on_accepted_tag::fn_type > &) ; void on_acceptor_error(const boost::function< typename net::on_acceptor_error_tag::fn_type > &) ; };
Acceptor is a class that accepts incoming connections. Private inheritance and forwarding functions used to ensure uniform interface over all implementations.
acceptor
public member functionstemplate<typename Endpoint> acceptor_error open(const Endpoint & endpoint, std::size_t backlog = 1) ;
Once the acceptor is open, it can accept connections using accept().
Parameters
number of pending connections that may be queued
a socket endpoint
acceptor_error accept() ;
template<typename AHandler> void attach(AHandler * handler) ;
void on_accepted(const boost::function< typename net::socket::on_accepted_tag::fn_type > & handler) ;
void on_acceptor_error(const boost::function< typename net::on_acceptor_error_tag::fn_type > & handler) ;
Copyright © 2004 Hugo Duncan |