boost::capy::read_until
read_until overloads
Synopses
Declared in <boost/capy/read_until.hpp>
Asynchronously read until a delimiter string is found.
template<
ReadStream Stream,
class B>
requires DynamicBufferParam<B&&>
auto
read_until(
Stream& stream,
B&& buffers,
std::string_view delim,
std::size_t initial_amount = 2048);
Asynchronously read until a match condition is satisfied.
template<
ReadStream Stream,
class B,
MatchCondition M>
requires DynamicBufferParam<B&&>
auto
read_until(
Stream& stream,
B&& buffers,
M match,
std::size_t initial_amount = 2048);
Return Value
-
An awaitable yielding
(error_code, std::size_t). On success,nis bytes up to and including the delimiter. Compare error codes to conditions: -
An awaitable yielding
(error_code, std::size_t). On success,nis the position returned by the match condition (bytes up to and including the matched delimiter). Compare error codes to conditions:
Parameters
| Name | Description |
|---|---|
stream |
The stream to read from. The caller retains ownership. |
buffers |
The dynamic buffer to append data to. Must remain valid until the operation completes. |
delim |
The delimiter string to search for. |
initial_amount |
Initial bytes to read per iteration (default 2048). Grows by 1.5x when filled. |
match |
The match condition callable. Copied into the awaitable. |
See Also
read_until, match_delim, DynamicBufferParam
read_some, MatchCondition, DynamicBufferParam
Created with MrDocs