Skip to main content

Module frame

Module frame 

Source
Expand description

TCP stream packet framing codec.

Frames protocol messages using a 4-byte magic header (0xF2B49E2C) and a 4-byte little-endian length prefix: [magic (4B)][length (4B)][payload].

Structs§

Packet
A length-prefixed protocol packet.

Enums§

FrameScan
Result of scanning a byte buffer for a leading frame without allocating.

Constants§

MAGIC_HEADER
Magic header for RODECaster protocol packets (little-endian on the wire).

Functions§

frame_payload
Borrow the payload of one complete frame at offset 0 without copying.
scan_frame
Scan buf for a complete frame at offset 0 without allocating.