Skip to main content

Module codec

Module codec 

Source
Expand description

Length-prefixed CBOR frame codec for reading and writing protocol messages.

Constants§

MAX_FRAME_SIZE
Maximum allowed frame size (4 MiB).

Functions§

encode_to_buf
Encodes a message to a byte buffer using the length-prefixed frame format.
read_message
Reads a length-prefixed CBOR message from the given reader.
try_decode_from_buf
Tries to decode a complete message from a byte buffer.
write_message
Writes a length-prefixed CBOR message to the given writer.