boost::capy::any_read_source::read_some

Initiate a partial read operation.

Synopsis

template<MutableBufferSequence MB>
auto
read_some(MB buffers);

Description

Reads one or more bytes into the provided buffer sequence. May fill less than the full sequence.

Immediate Completion

The operation completes immediately without suspending the calling coroutine when:

  • The buffer sequence is empty, returning `{error_code{}, 0}`.

  • The underlying source's awaitable reports immediate readiness via `await_ready`.

This is a partial operation and may not process the entire buffer sequence. Use read for guaranteed complete transfer.

Preconditions

The wrapper must contain a valid source (has_value() == true). The caller must not call this function again after a prior call returned an error (including EOF).

Return Value

An awaitable yielding (error_code,std::size_t).

Parameters

Name Description

buffers

The buffer sequence to read into.

Created with MrDocs