Skip to main content

read_request_from

Function read_request_from 

Source
pub fn read_request_from<'a>(
    receive: &mut impl FnMut(&mut [u8]) -> Result<usize>,
    storage: &'a mut [u8],
    policy: RequestPolicy,
) -> Result<Request<'a>>
Expand description

Host transport boundary for authenticated TLS or other blocking streams. The callback fills at most the supplied slice, returns zero on EOF, and owns its transport deadlines/cancellation. Any error invalidates storage. Rust owns HTTP/Git parsing; the host owns peer authentication and TLS buffering. This default entry rejects Transfer-Encoding, as does the socket reader.