asio 0.1.5 | Main Page | Class Index | Member Index | Tutorial |
Public Types | |
typedef Service | service_type |
The type of the service that will be used to provide accept operations. | |
typedef service_type::impl_type | impl_type |
The native implementation type of the socket acceptor. | |
typedef service_type::demuxer_type | demuxer_type |
The demuxer type for this asynchronous type. | |
Public Member Functions | |
basic_socket_acceptor (demuxer_type &d) | |
Construct an acceptor without opening it. | |
template<typename Address> | basic_socket_acceptor (demuxer_type &d, const Address &address, int listen_backlog=0) |
Construct an acceptor opened on the given address. | |
~basic_socket_acceptor () | |
Destructor. | |
demuxer_type & | demuxer () |
Get the demuxer associated with the asynchronous object. | |
template<typename Protocol> void | open (const Protocol &protocol) |
Open the acceptor using the specified protocol. | |
template<typename Protocol, typename Error_Handler> void | open (const Protocol &protocol, Error_Handler error_handler) |
Open the acceptor using the specified protocol. | |
template<typename Address> void | bind (const Address &address) |
Bind the acceptor to the given local address. | |
template<typename Address, typename Error_Handler> void | bind (const Address &address, Error_Handler error_handler) |
Bind the acceptor to the given local address. | |
void | listen (int backlog=0) |
Place the acceptor into the state where it will listen for new connections. | |
template<typename Error_Handler> void | listen (int backlog, Error_Handler error_handler) |
Place the acceptor into the state where it will listen for new connections. | |
void | close () |
Close the acceptor. | |
impl_type | impl () |
Get the underlying implementation in the native type. | |
template<typename Option> void | set_option (const Option &option) |
Set an option on the acceptor. | |
template<typename Option, typename Error_Handler> void | set_option (const Option &option, Error_Handler error_handler) |
Set an option on the acceptor. | |
template<typename Option> void | get_option (Option &option) |
Get an option from the acceptor. | |
template<typename Option, typename Error_Handler> void | get_option (Option &option, Error_Handler error_handler) |
Get an option from the acceptor. | |
template<typename Address> void | get_local_address (Address &address) |
Get the local address of the acceptor. | |
template<typename Address, typename Error_Handler> void | get_local_address (Address &address, Error_Handler error_handler) |
Get the local address of the acceptor. | |
template<typename Stream> void | accept (Stream &peer_socket) |
Accept a new connection. | |
template<typename Stream, typename Error_Handler> void | accept (Stream &peer_socket, Error_Handler error_handler) |
Accept a new connection. | |
template<typename Stream, typename Handler> void | async_accept (Stream &peer_socket, Handler handler) |
Start an asynchronous accept. | |
template<typename Stream, typename Handler, typename Completion_Context> void | async_accept (Stream &peer_socket, Handler handler, Completion_Context context) |
Start an asynchronous accept. | |
template<typename Stream, typename Address> void | accept_address (Stream &peer_socket, Address &peer_address) |
Accept a new connection and obtain the address of the peer. | |
template<typename Stream, typename Address, typename Error_Handler> void | accept_address (Stream &peer_socket, Address &peer_address, Error_Handler error_handler) |
Accept a new connection and obtain the address of the peer. | |
template<typename Stream, typename Address, typename Handler> void | async_accept_address (Stream &peer_socket, Address &peer_address, Handler handler) |
Start an asynchronous accept. | |
template<typename Stream, typename Address, typename Handler, typename Completion_Context> void | async_accept_address (Stream &peer_socket, Address &peer_address, Handler handler, Completion_Context context) |
Start an asynchronous accept. | |
Private Attributes | |
service_type & | service_ |
The backend service implementation. | |
impl_type | impl_ |
The underlying native implementation. |
|
The type of the service that will be used to provide accept operations.
|
|
The native implementation type of the socket acceptor.
|
|
The demuxer type for this asynchronous type.
|
|
Construct an acceptor without opening it. This constructor creates an acceptor without opening it to listen for new connections. The open() function must be called before the acceptor can accept new socket connections.
|
|
Construct an acceptor opened on the given address. This constructor creates an acceptor and automatically opens it to listen for new connections on the specified address.
|
|
Destructor.
|
|
Get the demuxer associated with the asynchronous object. This function may be used to obtain the demuxer object that the acceptor uses to deliver completions for asynchronous operations.
|
|
Open the acceptor using the specified protocol. This function opens the socket acceptor so that it will use the specified protocol.
|
|
Open the acceptor using the specified protocol. This function opens the socket acceptor so that it will use the specified protocol.
|
|
Bind the acceptor to the given local address. This function binds the socket acceptor to the specified address on the local machine.
|
|
Bind the acceptor to the given local address. This function binds the socket acceptor to the specified address on the local machine.
|
|
Place the acceptor into the state where it will listen for new connections. This function puts the socket acceptor into the state where it may accept new connections.
|
|
Place the acceptor into the state where it will listen for new connections. This function puts the socket acceptor into the state where it may accept new connections.
|
|
Close the acceptor. This function is used to close the acceptor. Any asynchronous accept operations will be cancelled immediately. A subsequent call to open() is required before the acceptor can again be used to again perform socket accept operations. |
|
Get the underlying implementation in the native type. This function may be used to obtain the underlying implementation of the socket acceptor. This is intended to allow access to native socket functionality that is not otherwise provided. |
|
Set an option on the acceptor. This function is used to set an option on the acceptor.
|
|
Set an option on the acceptor. This function is used to set an option on the acceptor.
|
|
Get an option from the acceptor. This function is used to get the current value of an option on the acceptor.
|
|
Get an option from the acceptor. This function is used to get the current value of an option on the acceptor.
|
|
Get the local address of the acceptor. This function is used to obtain the locally bound address of the acceptor.
|
|
Get the local address of the acceptor. This function is used to obtain the locally bound address of the acceptor.
|
|
Accept a new connection. This function is used to accept a new connection from a peer into the given stream socket. The function call will block until a new connection has been accepted successfully or an error occurs.
|
|
Accept a new connection. This function is used to accept a new connection from a peer into the given stream socket. The function call will block until a new connection has been accepted successfully or an error occurs.
|
|
Start an asynchronous accept. This function is used to asynchronously accept a new connection into a stream socket. The function call always returns immediately.
|
|
Start an asynchronous accept. This function is used to asynchronously accept a new connection into a stream socket. The function call always returns immediately.
|
|
Accept a new connection and obtain the address of the peer. This function is used to accept a new connection from a peer into the given stream socket, and additionally provide the address of the remote peer. The function call will block until a new connection has been accepted successfully or an error occurs.
|
|
Accept a new connection and obtain the address of the peer. This function is used to accept a new connection from a peer into the given stream socket, and additionally provide the address of the remote peer. The function call will block until a new connection has been accepted successfully or an error occurs.
|
|
Start an asynchronous accept. This function is used to asynchronously accept a new connection into a stream socket, and additionally obtain the address of the remote peer. The function call always returns immediately.
|
|
Start an asynchronous accept. This function is used to asynchronously accept a new connection into a stream socket, and additionally obtain the address of the remote peer. The function call always returns immediately.
|
|
The backend service implementation.
|
|
The underlying native implementation.
|