Multiplex header for inter-edge trunk UDP payloads.
What problem this solves
One trunk pipe carries RTP, RTCP, and opaque datachannel bytes. A single leading type byte keeps demux cheap without WebRTC/ICE on the SFU-to-SFU path.
RFCs
None directly; RTP/SRTP payloads inside follow RFC 3550 / RFC 3711.
Summary
Functions
Decodes a multiplex frame. Returns {:ok, kind, payload} or {:error, :bad_frame}.
Unpacks a datachannel frame body.
Encodes kind and payload as <<type, payload::binary>>.
Packs an opaque datachannel frame body: <<label_len::16, label::binary, data::binary>>.
Types
Functions
Decodes a multiplex frame. Returns {:ok, kind, payload} or {:error, :bad_frame}.
Unpacks a datachannel frame body.
Encodes kind and payload as <<type, payload::binary>>.
Packs an opaque datachannel frame body: <<label_len::16, label::binary, data::binary>>.