boost::capy::any_write_sink::write

Initiate a complete write operation.

Synopsis

template<ConstBufferSequence CB>
io_task<std::size_t>
write(CB buffers);

Description

Writes data from the provided buffer sequence. The operation completes when all bytes have been consumed, or an error occurs. Forwards to the underlying sink's write operation, windowed through buffer_param when the sequence exceeds the per‐call buffer limit.

Immediate Completion

The operation completes immediately without suspending the calling coroutine when:

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

  • Every underlying `write` call completes immediately (the wrapped sink reports readiness via `await_ready` on each iteration).

Preconditions

The wrapper must contain a valid sink (has_value() == true).

Return Value

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

Parameters

Name Description

buffers

The buffer sequence containing data to write.

Created with MrDocs