Skip to main content

pipe_data

Function pipe_data 

Source
async fn pipe_data(
    recv: PeekedRecv,
    send: SendStream,
    side: ProxySide,
    key: StreamKey,
    serialize_after: Option<StreamKey>,
    requests: Receiver<StreamCommand>,
    ctx: &ForwardCtx,
) -> Result<(), ProxyError>
Expand description

Pipe a unidirectional data stream.

The choice made here is the whole cost model of the data path: pipe_data_passthrough never allocates and never decodes, while pipe_data_framed buffers each object whole so it can be reported.