![]() |
Home | Libraries | People | FAQ | More |
Inherited by Stream.
Inheritance diagram for Async_Read_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 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. |
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_Read_Stream::async_read_some | ( | const Mutable_Buffers & | buffers, | |
Handler | handler | |||
) |
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.
Copyright © 2003 - 2006 Christopher M. Kohlhoff |