| Home | Libraries | People | FAQ | More

### async_read

The `async_read` function is a composed asynchronous operation that reads a certain amount of data from a stream before completion.

Start an asynchronous operation to read a certain amount of data from a stream.

    template<
        typename AsyncReadStream,
        typename MutableBufferSequence,
        typename ReadHandler>
    DEDUCED async_read(
        AsyncReadStream & s,
        const MutableBufferSequence & buffers,
        ReadHandler && handler,
        typename enable_if< is_mutable_buffer_sequence< MutableBufferSequence >::value >::type *  = 0);
      » more...

    template<
        typename AsyncReadStream,
        typename MutableBufferSequence,
        typename CompletionCondition,
        typename ReadHandler>
    DEDUCED async_read(
        AsyncReadStream & s,
        const MutableBufferSequence & buffers,
        CompletionCondition completion_condition,
        ReadHandler && handler,
        typename enable_if< is_mutable_buffer_sequence< MutableBufferSequence >::value >::type *  = 0);
      » more...

    template<
        typename AsyncReadStream,
        typename DynamicBuffer_v1,
        typename ReadHandler>
    DEDUCED async_read(
        AsyncReadStream & s,
        DynamicBuffer_v1 && buffers,
        ReadHandler && handler,
        typename enable_if< is_dynamic_buffer_v1< typename decay< DynamicBuffer_v1 >::type >::value &&!is_dynamic_buffer_v2< typename decay< DynamicBuffer_v1 >::type >::value >::type *  = 0);
      » more...

    template<
        typename AsyncReadStream,
        typename DynamicBuffer_v1,
        typename CompletionCondition,
        typename ReadHandler>
    DEDUCED async_read(
        AsyncReadStream & s,
        DynamicBuffer_v1 && buffers,
        CompletionCondition completion_condition,
        ReadHandler && handler,
        typename enable_if< is_dynamic_buffer_v1< typename decay< DynamicBuffer_v1 >::type >::value &&!is_dynamic_buffer_v2< typename decay< DynamicBuffer_v1 >::type >::value >::type *  = 0);
      » more...

    template<
        typename AsyncReadStream,
        typename Allocator,
        typename ReadHandler>
    DEDUCED async_read(
        AsyncReadStream & s,
        basic_streambuf< Allocator > & b,
        ReadHandler && handler);
      » more...

    template<
        typename AsyncReadStream,
        typename Allocator,
        typename CompletionCondition,
        typename ReadHandler>
    DEDUCED async_read(
        AsyncReadStream & s,
        basic_streambuf< Allocator > & b,
        CompletionCondition completion_condition,
        ReadHandler && handler);
      » more...

    template<
        typename AsyncReadStream,
        typename DynamicBuffer_v2,
        typename ReadHandler>
    DEDUCED async_read(
        AsyncReadStream & s,
        DynamicBuffer_v2 buffers,
        ReadHandler && handler,
        typename enable_if< is_dynamic_buffer_v2< DynamicBuffer_v2 >::value >::type *  = 0);
      » more...

    template<
        typename AsyncReadStream,
        typename DynamicBuffer_v2,
        typename CompletionCondition,
        typename ReadHandler>
    DEDUCED async_read(
        AsyncReadStream & s,
        DynamicBuffer_v2 buffers,
        CompletionCondition completion_condition,
        ReadHandler && handler,
        typename enable_if< is_dynamic_buffer_v2< DynamicBuffer_v2 >::value >::type *  = 0);
      » more...

##### Requirements

Header: `boost/asio/read.hpp`

Convenience header: `boost/asio.hpp`