| Home | Libraries | People | FAQ | More

### read

Attempt to read a certain amount of data from a stream before returning.

    template<
        typename SyncReadStream,
        typename MutableBufferSequence>
    std::size_t read(
        SyncReadStream & s,
        const MutableBufferSequence & buffers);

    template<
        typename SyncReadStream,
        typename MutableBufferSequence,
        typename CompletionCondition>
    std::size_t read(
        SyncReadStream & s,
        const MutableBufferSequence & buffers,
        CompletionCondition completion_condition);

    template<
        typename SyncReadStream,
        typename MutableBufferSequence,
        typename CompletionCondition>
    std::size_t read(
        SyncReadStream & s,
        const MutableBufferSequence & buffers,
        CompletionCondition completion_condition,
        boost::system::error_code & ec);

    template<
        typename SyncReadStream,
        typename Allocator>
    std::size_t read(
        SyncReadStream & s,
        basic_streambuf< Allocator > & b);

    template<
        typename SyncReadStream,
        typename Allocator,
        typename CompletionCondition>
    std::size_t read(
        SyncReadStream & s,
        basic_streambuf< Allocator > & b,
        CompletionCondition completion_condition);

    template<
        typename SyncReadStream,
        typename Allocator,
        typename CompletionCondition>
    std::size_t read(
        SyncReadStream & s,
        basic_streambuf< Allocator > & b,
        CompletionCondition completion_condition,
        boost::system::error_code & ec);