Expand description
Length-prefixed framing for byte streams: a big-endian u32 length, then the message.
Structs§
- Frame
Decoder - Collects bytes as they are read and hands out whole messages.
Constants§
- MAX_
FRAME - Largest message accepted (32 MiB): a long conversation with a few full-HD images fits, a runaway one does not. Peers before 0.5 accept 8 MiB.
Functions§
- encode_
frame - One framed message, ready to write.