Expand description
Bounded framing for text responses from remote servers.
Structs§
- Frame
Reader - An absolute deadline for an explicitly started binary frame. No clock runs between frames or while the caller handles the completed event.
Constants§
- MAX_
MULTILINE_ BYTES - Total retained text of a dot-terminated POP3/NNTP response.
- MAX_
RESPONSE_ LINE_ BYTES - Generous control/response-line limit, including CRLF.
- RESPONSE_
DEADLINE - Absolute deadline after the first byte of a line or multiline body.
Functions§
- read_
dot_ response - Read through the exact
.terminator. Preserve content whitespace, undo dot stuffing, and reject EOF or a size violation instead of reporting a partial reply. - read_
expected_ response_ line - A solicited greeting/response must begin and finish within the handshake deadline.
- read_
response_ line - Replace the line buffer with a complete bounded line. Partial EOF is an error;
callers must close on an error because the stream is no longer synchronized.
Like
read_line, this must not be cancelled midway through a response. - read_
response_ line_ with_ timeout - Variant with an explicit partial-line deadline (also useful to test slow peers).