pub fn read_message<R: BufRead>(
reader: &mut R,
) -> Result<(Vec<u8>, Framing), FrameError>Expand description
Read one framed body. The returned Framing is what the reply must use.
The cap is the body size: a JSONL payload of MAX_MESSAGE_BYTES plus its
terminating newline (or CRLF) is accepted. That matches write_message.
ยงErrors
Returns an error when the stream ends mid-frame, the header block is too
long or lacks a valid Content-Length, the body exceeds
MAX_MESSAGE_BYTES, or the reader fails.