Skip to main content

frame

Function frame 

Source
pub async fn frame(
    stream: &mut TcpStream,
    header_len: usize,
    max: usize,
    length: fn(&[u8]) -> Result<usize>,
) -> Result<Vec<u8>>
Expand description

A bounded framed stream read. The header determines the whole length, validated before allocation.