Skip to main content

encode_raw_to_buf

Function encode_raw_to_buf 

Source
pub fn encode_raw_to_buf(
    frame: &RawFrame,
    buf: &mut Vec<u8>,
) -> ProtocolResult<()>
Expand description

Encodes a raw frame to a byte buffer using the length-prefixed format.

Frame format: [len: u32 BE][id: u32 BE][flags: u8][body...]