Releases the underlying reader and cancels the stream.
Returns the next n bytes without consuming them.
Number of bytes to inspect.
OptionaltimeoutMs: number
Optional deadline.
A copy of the next n bytes.
Reads one line terminated by LF, returning it decoded as UTF-8 with the trailing CRLF or LF stripped. Suitable for the text line protocols (SMTP, IMAP, POP3).
OptionaltimeoutMs: number
Optional deadline.
The line without its terminator.
Reads and consumes exactly n bytes.
Number of bytes to read.
OptionaltimeoutMs: number
Optional deadline; rejects with TimeoutError if exceeded.
The n bytes read.
Reads and consumes bytes up to and including the first occurrence of delim.
The delimiter to scan for.
Optionalmax: number
Optional cap on bytes scanned before failing (guards against a peer that never sends the delimiter).
OptionaltimeoutMs: number
Optional deadline.
Everything up to and including delim.
Releases the underlying stream lock without cancelling the stream.
Used when a starttls upgrade swaps the socket: the old reader must relinquish its lock so
the new socket's streams can be locked, without cancelling the (discarded) old stream.
FramedReader backed by a ReadableStream of bytes.