Skip to main content

pipe_control_mutating

Function pipe_control_mutating 

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

Parse-then-forward control stream pipe.

Bytes are withheld until a complete control message has been parsed, at which point the hook’s on_control_message is consulted and its Some(bytes) return value (if any) is forwarded in place of the original wire frame. This adds a per-frame latency cost — a hook that only observes should leave wants_control_mutation() at its default false and take the pass-through path instead.