Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

Buffer-oriented asynchronous random-access read device requirements

In the table below, a denotes an asynchronous random access read device object, o denotes an offset of type boost::uint64_t, mb denotes an object satisfying mutable buffer sequence requirements, and h denotes an object satisfying read handler requirements.

Table 1. Buffer-oriented asynchronous random-access read device requirements

operation

type

semantics, pre/post-conditions

a.get_io_service();

io_service&

Returns the io_service object through which the async_read_some_at handler h will be invoked.

a.async_read_some_at(o, mb, h);

void

Initiates an asynchronous operation to read one or more bytes of data from the device a at the offset o. The operation is performed via the io_service object a.get_io_service() and behaves according to asynchronous operation requirements.

The mutable buffer sequence mb specifies memory where the data should be placed. The async_read_some_at operation shall always fill a buffer in the sequence completely before proceeding to the next.

The implementation shall maintain one or more copies of mb until such time as the read operation no longer requires access to the memory specified by the buffers in the sequence. The program must ensure the memory is valid until:

— the last copy of mb is destroyed, or

— the handler for the asynchronous read operation is invoked,

whichever comes first.

If the total size of all buffers in the sequence mb is 0, the asynchronous read operation shall complete immediately and pass 0 as the argument to the handler that specifies the number of bytes read.



PrevUpHomeNext