pub fn encode_frame(track: &str, payload: &[u8]) -> Vec<u8> ⓘExpand description
Encode one DMA frame.
The track-length prefix is a u16; a track name longer than u16::MAX
would truncate the length header and desync decode_frame for the rest of
the stream, so we drop the over-long frame (returning an empty Vec) rather
than corrupt the channel. Track names are short by construction (moq paths).