Skip to main content

write_frame

Function write_frame 

Source
pub fn write_frame<W: Write>(
    writer: &mut W,
    body: &[u8],
) -> Result<usize, FramingError>
Expand description

Write one v1 frame to writer.

The frame is laid out as [u8 framing_version=1][u32 LE body_length][body]. Returns the number of bytes written on success (5 + body.len()).

ยงErrors