Skip to main content

Module reassembler

Module reassembler 

Source
Available on crate feature reassembler only.
Expand description

Sync TCP reassembly hooks.

Reassembler is the trait users implement to consume TCP byte streams from one direction of one session. BufferedReassembler is the simplest possible impl: in-order accumulation into a Vec<u8>, with out-of-order segments dropped.

For tokio users with backpressure needs, see netring’s AsyncReassembler and channel_factory.

Structs§

BufferedReassembler
Built-in: drop OOO segments, accumulate in-order bytes into a Vec<u8> per direction. Drain via take.
BufferedReassemblerFactory
Default factory that builds a fresh BufferedReassembler per (flow, side). Useful when you want byte buffers without implementing a custom factory.
NoopReassembler
Discards every segment without buffering. Used by the unified crate::driver::Driver as the central FlowDriver’s reassembler factory when the driver itself doesn’t need byte-stream reassembly — that work happens inside each registered slot’s own FlowSessionDriver. Plan-116 support.
NoopReassemblerFactory
Factory for NoopReassembler. New in 0.10.0.

Traits§

Reassembler
Receives TCP segments for one direction of one session. Sync — implementors don’t await; for blocking consumers (Vec buffer, std::sync::mpsc, sync protocol parsers).
ReassemblerFactory
Build a Reassembler for a brand-new session, given its key and side. Modeled after gopacket’s StreamFactory.