Skip to main content

Module codec

Module codec 

Source
Expand description

Length-prefixed messages on QUIC streams: a LENGTH_PREFIX_BYTES-byte big-endian length, then the protobuf encoding.

Functionsยง

read_message
Reads the next message. Ok(None) when the stream ended cleanly before a message; an error when it ended inside one or the length exceeds max_bytes (checked before allocating).
write_message
Writes message with its length prefix.