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 socket operations. | |
typedef service_type::impl_type | impl_type |
The native implementation type of the stream socket. | |
typedef service_type::demuxer_type | demuxer_type |
The demuxer type for this asynchronous type. | |
typedef basic_stream_socket< service_type > | lowest_layer_type |
A basic_stream_socket is always the lowest layer. | |
Public Member Functions | |
basic_stream_socket (demuxer_type &d) | |
Construct a basic_stream_socket without opening it. | |
~basic_stream_socket () | |
Destructor. | |
demuxer_type & | demuxer () |
Get the demuxer associated with the asynchronous object. | |
void | close () |
Close the socket. | |
lowest_layer_type & | lowest_layer () |
Get a reference to the lowest layer. | |
impl_type | impl () |
Get the underlying implementation in the native type. | |
void | set_impl (impl_type new_impl) |
Set the underlying implementation in the native type. | |
template<typename Option> void | set_option (const Option &option) |
Set an option on the socket. | |
template<typename Option, typename Error_Handler> void | set_option (const Option &option, Error_Handler error_handler) |
Set an option on the socket. | |
template<typename Option> void | get_option (Option &option) |
Get an option from the socket. | |
template<typename Option, typename Error_Handler> void | get_option (Option &option, Error_Handler error_handler) |
Get an option from the socket. | |
template<typename Address> void | get_local_address (Address &address) |
Get the local address of the socket. | |
template<typename Address, typename Error_Handler> void | get_local_address (Address &address, Error_Handler error_handler) |
Get the local address of the socket. | |
template<typename Address> void | get_remote_address (Address &address) |
Get the remote address of the socket. | |
template<typename Address, typename Error_Handler> void | get_remote_address (Address &address, Error_Handler error_handler) |
Get the remote address of the socket. | |
size_t | send (const void *data, size_t length) |
Send the given data to the peer. | |
template<typename Error_Handler> size_t | send (const void *data, size_t length, Error_Handler error_handler) |
Send the given data to the peer. | |
template<typename Handler> void | async_send (const void *data, size_t length, Handler handler) |
Start an asynchronous send. | |
template<typename Handler, typename Completion_Context> void | async_send (const void *data, size_t length, Handler handler, Completion_Context context) |
Start an asynchronous send. | |
size_t | recv (void *data, size_t max_length) |
Receive some data from the peer. | |
template<typename Error_Handler> size_t | recv (void *data, size_t max_length, Error_Handler error_handler) |
Receive some data from the peer. | |
template<typename Handler> void | async_recv (void *data, size_t max_length, Handler handler) |
Start an asynchronous receive. | |
template<typename Handler, typename Completion_Context> void | async_recv (void *data, size_t max_length, Handler handler, Completion_Context context) |
Start an asynchronous receive. | |
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 socket operations.
|
|
The native implementation type of the stream socket.
|
|
The demuxer type for this asynchronous type.
|
|
A basic_stream_socket is always the lowest layer.
|
|
Construct a basic_stream_socket without opening it. This constructor creates a stream socket without connecting it to a remote peer. The socket needs to be connected or accepted before data can be sent or received on it.
|
|
Destructor.
|
|
Get the demuxer associated with the asynchronous object. This function may be used to obtain the demuxer object that the stream socket uses to deliver completions for asynchronous operations.
|
|
Close the socket. This function is used to close the stream socket. Any asynchronous send or recv operations will be cancelled immediately. |
|
Get a reference to the lowest layer. This function returns a reference to the lowest layer in a stack of stream layers. Since a basic_stream_socket cannot contain any further stream layers, it simply returns a reference to itself.
|
|
Get the underlying implementation in the native type. This function may be used to obtain the underlying implementation of the stream socket. This is intended to allow access to native socket functionality that is not otherwise provided. |
|
Set the underlying implementation in the native type. This function is used by the acceptor and connector implementations to set the underlying implementation associated with the stream socket.
|
|
Set an option on the socket. This function is used to set an option on the socket.
|
|
Set an option on the socket. This function is used to set an option on the socket.
|
|
Get an option from the socket. This function is used to get the current value of an option on the socket.
|
|
Get an option from the socket. This function is used to get the current value of an option on the socket.
|
|
Get the local address of the socket. This function is used to obtain the locally bound address of the socket.
|
|
Get the local address of the socket. This function is used to obtain the locally bound address of the socket.
|
|
Get the remote address of the socket. This function is used to obtain the remote address of the socket.
|
|
Get the remote address of the socket. This function is used to obtain the remote address of the socket.
|
|
Send the given data to the peer. This function is used to send data to the stream socket's peer. The function call will block until the data has been sent successfully or an error occurs.
|
|
Send the given data to the peer. This function is used to send data to the stream socket's peer. The function call will block until the data has been sent successfully or an error occurs.
|
|
Start an asynchronous send. This function is used to asynchronously send data to the stream socket's peer. The function call always returns immediately.
|
|
Start an asynchronous send. This function is used to asynchronously send data to the stream socket's peer. The function call always returns immediately.
|
|
Receive some data from the peer. This function is used to receive data from the stream socket's peer. The function call will block until data has received successfully or an error occurs.
|
|
Receive some data from the peer. This function is used to receive data from the stream socket's peer. The function call will block until data has received successfully or an error occurs.
|
|
Start an asynchronous receive. This function is used to asynchronously receive data from the stream socket's peer. The function call always returns immediately.
|
|
Start an asynchronous receive. This function is used to asynchronously receive data from the stream socket's peer. The function call always returns immediately.
|
|
The backend service implementation.
|
|
The underlying native implementation.
|