Skip to main content

write_frame

Function write_frame 

Source
pub fn write_frame<W: Write>(
    writer: &mut W,
    payload: &[u8],
    max_bytes: usize,
) -> AppResult<()>
Expand description

Write one length-delimited frame carrying payload, flushing on completion.

ยงErrors

Returns a typed AppError if payload exceeds max_bytes or the underlying writer fails (cause preserved).