Skip to main content

pipe_control

Function pipe_control 

Source
async fn pipe_control(
    recv: RecvStream,
    send: SendStream,
    side: ProxySide,
    ctx: &ForwardCtx,
) -> Result<(), ProxyError>
Expand description

Pipe a control stream direction.

Bytes are forwarded to the peer immediately upon receipt — the parser runs on a cloned copy purely to emit observer events. A stuck or erroring parser can never block forwarding. This matches the pass-through semantics of the data-stream and datagram paths.

If ctx.draft_is_fixed is false (moq-00 cohort, drafts 07–14), the parser start is deferred until enough bytes arrive to peek the first SETUP message and pick a concrete draft. Bytes observed during that detection window are still forwarded immediately.