Reference | Class Hierarchy | Class Index | Member Index |
Inheritance diagram for Stream:
Public Types | |
typedef implementation_defined | lowest_layer_type |
The type of the lowest layer in the stream. | |
typedef implementation_defined | io_service_type |
The io_service type for this object. | |
typedef implementation_defined | error_type |
The type used for reporting errors. | |
typedef implementation_defined | io_service_type |
The io_service type for this object. | |
typedef implementation_defined | error_type |
The type used for reporting errors. | |
typedef implementation_defined | error_type |
The type used for reporting errors. | |
typedef implementation_defined | error_type |
The type used for reporting errors. | |
Public Member Functions | |
lowest_layer_type & | lowest_layer () |
Get a reference to the lowest layer. | |
template<typename Mutable_Buffers, typename Handler> | |
void | async_read_some (const Mutable_Buffers &buffers, Handler handler) |
Start an asynchronous read. | |
io_service_type & | io_service () |
Get the io_service associated with the object. | |
template<typename Const_Buffers, typename Handler> | |
void | async_write_some (const Const_Buffers &buffers, Handler handler) |
Start an asynchronous write. | |
io_service_type & | io_service () |
Get the io_service associated with the object. | |
template<typename Mutable_Buffers> | |
std::size_t | read_some (const Mutable_Buffers &buffers) |
Read some data from the stream. | |
template<typename Mutable_Buffers, typename Error_Handler> | |
std::size_t | read_some (const Mutable_Buffers &buffers, Error_Handler error_handler) |
Read some data from the stream. | |
template<typename Mutable_Buffers> | |
std::size_t | peek (const Mutable_Buffers &buffers) |
Peek at the incoming data on the stream. | |
template<typename Mutable_Buffers, typename Error_Handler> | |
std::size_t | peek (const Mutable_Buffers &buffers, Error_Handler error_handler) |
Peek at the incoming data on the stream. | |
std::size_t | in_avail () |
Determine the amount of data that may be read without blocking. | |
template<typename Error_Handler> | |
std::size_t | in_avail (Error_Handler error_handler) |
Determine the amount of data that may be read without blocking. | |
template<typename Const_Buffers> | |
std::size_t | write_some (const Const_Buffers &buffers) |
Write the given data on the stream. | |
template<typename Const_Buffers, typename Error_Handler> | |
std::size_t | write_some (const Const_Buffers &buffers, Error_Handler error_handler) |
Write the given data on the stream. |
typedef implementation_defined Stream::lowest_layer_type |
The type of the lowest layer in the stream.
typedef implementation_defined Async_Object::io_service_type [inherited] |
The io_service type for this object.
typedef implementation_defined Error_Source::error_type [inherited] |
The type used for reporting errors.
typedef implementation_defined Async_Object::io_service_type [inherited] |
The io_service type for this object.
typedef implementation_defined Error_Source::error_type [inherited] |
The type used for reporting errors.
typedef implementation_defined Error_Source::error_type [inherited] |
The type used for reporting errors.
typedef implementation_defined Error_Source::error_type [inherited] |
The type used for reporting errors.
lowest_layer_type& Stream::lowest_layer | ( | ) |
Get a reference to the lowest layer.
void Async_Read_Stream::async_read_some | ( | const Mutable_Buffers & | buffers, | |
Handler | handler | |||
) | [inherited] |
Start an asynchronous read.
This function is used to asynchronously read one or more bytes of data from the stream. The function call always returns immediately.
buffers | The buffers into which the data will be read. Although the buffers object may be copied as necessary, ownership of the underlying buffers is retained by the caller, which must guarantee that they remain valid until the handler is called. | |
handler | The handler to be called when the read operation completes. Copies will be made of the handler as required. The equivalent function signature of the handler must be: void handler( const Async_Read_Stream::error_type& error, // Result of operation. std::size_t bytes_transferred // Number of bytes read. ); |
io_service_type& Async_Object::io_service | ( | ) | [inherited] |
Get the io_service associated with the object.
This function may be used to obtain the io_service object that the object uses to dispatch handlers for asynchronous operations.
void Async_Write_Stream::async_write_some | ( | const Const_Buffers & | buffers, | |
Handler | handler | |||
) | [inherited] |
Start an asynchronous write.
This function is used to asynchronously write one or more bytes of data to the stream. The function call always returns immediately.
buffers | The data to be written to the stream. Although the buffers object may be copied as necessary, ownership of the underlying buffers is retained by the caller, which must guarantee that they remain valid until the handler is called. | |
handler | The handler to be called when the write operation completes. Copies will be made of the handler as required. The equivalent function signature of the handler must be: void handler( const Async_Write_Stream::error_type& error, // Result of operation. std::size_t bytes_transferred // Number of bytes written. ); |
io_service_type& Async_Object::io_service | ( | ) | [inherited] |
Get the io_service associated with the object.
This function may be used to obtain the io_service object that the object uses to dispatch handlers for asynchronous operations.
std::size_t Sync_Read_Stream::read_some | ( | const Mutable_Buffers & | buffers | ) | [inherited] |
Read some data from the stream.
This function is used to read data from the stream. The function call will block until one or more bytes of data has been read successfully, or until an error occurs.
buffers | The buffers into which the data will be read. |
Sync_Read_Stream::error_type | Thrown on failure. |
std::size_t Sync_Read_Stream::read_some | ( | const Mutable_Buffers & | buffers, | |
Error_Handler | error_handler | |||
) | [inherited] |
Read some data from the stream.
This function is used to read data from the stream. The function call will block until one or more bytes of data has been read successfully, or until an error occurs.
buffers | The buffers into which the data will be read. | |
error_handler | The handler to be called when an error occurs. Copies will be made of the handler as required. The equivalent function signature of the handler must be: void error_handler( const Sync_Read_Stream::error_type& error // Result of operation. ); |
std::size_t Sync_Read_Stream::peek | ( | const Mutable_Buffers & | buffers | ) | [inherited] |
Peek at the incoming data on the stream.
This function is used to peek at the incoming data on the stream, without removing it from the input queue. The function call will block until data has been read successfully or an error occurs.
buffers | The buffers into which the data will be read. |
Sync_Read_Stream::error_type | Thrown on failure. |
std::size_t Sync_Read_Stream::peek | ( | const Mutable_Buffers & | buffers, | |
Error_Handler | error_handler | |||
) | [inherited] |
Peek at the incoming data on the stream.
This function is used to peek at the incoming data on the stream, without removing it from the input queue. The function call will block until data has been read successfully or an error occurs.
buffers | The buffers into which the data will be read. | |
error_handler | The handler to be called when an error occurs. Copies will be made of the handler as required. The equivalent function signature of the handler must be: void error_handler( const Sync_Read_Stream::error_type& error // Result of operation. ); |
std::size_t Sync_Read_Stream::in_avail | ( | ) | [inherited] |
Determine the amount of data that may be read without blocking.
The function is used to determine the amount of data, in bytes, that may be read from the stream without blocking.
Sync_Read_Stream::error_type | Thrown on failure. |
std::size_t Sync_Read_Stream::in_avail | ( | Error_Handler | error_handler | ) | [inherited] |
Determine the amount of data that may be read without blocking.
The function is used to determine the amount of data, in bytes, that may be read from the stream without blocking.
error_handler | The handler to be called when an error occurs. Copies will be made of the handler as required. The equivalent function signature of the handler must be: void error_handler( const Sync_Read_Stream::error_type& error // Result of operation ); |
std::size_t Sync_Write_Stream::write_some | ( | const Const_Buffers & | buffers | ) | [inherited] |
Write the given data on the stream.
This function is used to write data on the stream. The function call will block until one or more bytes of data has been written successfully, or until an error occurs.
buffers | The data to be written. |
Sync_Write_Stream::error_type | Thrown on failure. |
std::size_t Sync_Write_Stream::write_some | ( | const Const_Buffers & | buffers, | |
Error_Handler | error_handler | |||
) | [inherited] |
Write the given data on the stream.
This function is used to write data on the stream. The function call will block until one or more bytes of data has been written successfully, or until an error occurs.
buffers | The data to be written. | |
error_handler | The handler to be called when an error occurs. Copies will be made of the handler as required. The equivalent function signature of the handler must be: void error_handler( const Sync_Write_Stream::error_type& error // Result of operation. ); |