template<class SyncReadStream, class DynamicBuffer> size_t read_until(SyncReadStream& s, DynamicBuffer&& b, char delim); template<class SyncReadStream, class DynamicBuffer> size_t read_until(SyncReadStream& s, DynamicBuffer&& b, char delim, error_code& ec); template<class SyncReadStream, class DynamicBuffer> size_t read_until(SyncReadStream& s, DynamicBuffer&& b, string_view delim); template<class SyncReadStream, class DynamicBuffer> size_t read_until(SyncReadStream& s, DynamicBuffer&& b, string_view delim, error_code& ec);
-1- Effects: Reads data from the buffer-oriented synchronous read stream (17.1.1 [networking.ts::buffer.stream.reqmts.syncreadstream]) object stream by performing zero or more calls to the stream's
-2- Data is placed into the dynamic buffer object b. A mutable buffer sequence (16.2.1) is obtained prior to eachread_some
member function, until the input sequence readable bytes of the dynamic buffer (16.2.4 [networking.ts::buffer.reqmts.dynamicbuffer]) objectb
contain s the specified delimiterdelim
.read_some
call usingb.prepare(N)
, whereN
is an unspecified value such thatN <= max_size() - size()
. [Note: Implementations are encouraged to useb.capacity()
when determiningN
, to minimize the number ofread_some
calls performed on the stream. — end note] After eachread_some
call, the implementation performsb.commit(n)
, wheren
is the return value fromread_some
. -3- The synchronousread_until
operation continues until:-4- On exit, if the input sequence readable bytes of
(3.1) — the input sequence readable bytes of
b
contain s the delimiterdelim
; or(3.2) —
b.size() == b.max_size()
; or(3.3) — an asynchronous
read_some
operation fails.b
contain s the delimiter,ec
is set such that!ec
istrue
. Otherwise, ifb.size() == b.max_size()
,ec
is set such thatec == stream_errc::not_found
. Ifb.size() < b.max_size()
,ec
contains theerror_code
from the most recentread_some
call. -5- Returns: The number of bytes in the input sequence of readable bytes inb
up to and including the delimiter, if present. [Note: On completion, the buffer may contain additional bytes following the delimiter. — end note] Otherwise returns0
.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4