Reference | Class Hierarchy | Class Index | Member Index |
Inherited by Stream.
Inheritance diagram for Async_Write_Stream:
Public Types | |
typedef implementation_defined | io_service_type |
The io_service type for this object. | |
typedef implementation_defined | error_type |
The type used for reporting errors. | |
Public Member Functions | |
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. |
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.
void Async_Write_Stream::async_write_some | ( | const Const_Buffers & | buffers, | |
Handler | handler | |||
) |
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.