Skip to main content

Module codec

Module codec 

Source
Expand description

Length-prefixed framing for byte streams: a big-endian u32 length, then the message.

Structs§

FrameDecoder
Collects bytes as they are read and hands out whole messages.

Constants§

MAX_FRAME
Largest message accepted (8 MiB): a long conversation fits, a runaway one does not.

Functions§

encode_frame
One framed message, ready to write.