Skip to main content

emit_parsed_frames

Function emit_parsed_frames 

Source
fn emit_parsed_frames(
    parser: &mut ControlStreamParser,
    data: &[u8],
    side: ProxySide,
    ctx: &ForwardCtx,
)
Expand description

Feed bytes to the control parser and emit observer events for any completed frames.

The hook is deliberately not invoked here — on the pass-through path the bytes have already been forwarded, so a mutating Some(bytes) return would be silently discarded. Hooks that need to see control messages without rewriting them should be implemented as a ProxyObserver; hooks that need to rewrite them should set wants_control_mutation() to true, which routes traffic through pipe_control_mutating instead.