Function relay_chunked_stream

Source
pub async fn relay_chunked_stream<I, O>(
    input: &mut I,
    output: &mut O,
    limit: Option<usize>,
) -> Result<usize, Error>
where I: Write + Read + Unpin, O: Write + Read + Unpin,
Expand description

Streams chunk body data from input to output. Body length is unknown but we can provide size limit.

The method searches for 0\r\n\r\n which indicates the end of an input stream. If the limit is set and the body exceeds the allowed size then the forwarding will be stopped with an event.