Skip to main content

read_full

Function read_full 

Source
fn read_full(
    stream: &mut UnixStream,
    buf: &mut [u8],
    may_be_quiet: bool,
) -> Result<Filled, String>
Expand description

Fill buf from the stream.

Progress survives the poll timeout. The stream answers a read with nothing available at any point - a frame’s body arrives in many chunks, and the reader polls so it can look at its stop flag - so a timeout mid-frame resumes where it left off rather than failing the frame. Only a frame’s FIRST byte may report Filled::Quiet: once a frame has begun, nothing arriving for STALL is a wedge.