boost::capy::read
read overloads
Synopses
Declared in <boost/capy/read.hpp>
Asynchronously read until the buffer sequence is full.
io_task<std::size_t>
read(
auto& stream,
auto const& buffers);
Asynchronously read all data from a stream into a dynamic buffer.
io_task<std::size_t>
read(
auto& stream,
auto&& buffers,
std::size_t initial_amount = 2048);
Return Value
-
An awaitable yielding
(error_code, std::size_t). On success,nequalsbuffer_size(buffers). On error,nis the number of bytes read before the error. Compare error codes to conditions: -
An awaitable yielding
(error_code, std::size_t). On success (EOF),ecis clear andnis total bytes read. On error,nis bytes read before the error. Compare error codes to conditions:
Parameters
| Name | Description |
|---|---|
stream |
The stream to read from. The caller retains ownership. |
buffers |
The buffer sequence to fill. The caller retains ownership and must ensure validity until the operation completes. |
initial_amount |
Initial bytes to prepare (default 2048). |
source |
The source to read from. The caller retains ownership. |
See Also
read_some, ReadStream, MutableBufferSequence
read_some, ReadStream, DynamicBufferParam
ReadSource, DynamicBufferParam
Created with MrDocs