Expand description
Replay transport — feed a recorded wire log back through the session loop.
ReplayTransport implements Transport over a recorded wire log (see
crate::transport::recording): recv() yields the recorded inbound
frames in order (as fast as the session loop consumes them), and send()
collects outbound frames for later comparison instead of touching a network.
Because the session loop broadcasts events as soon as frames arrive, a
replay that starts streaming before the application has subscribed would
lose events nondeterministically. The transport is therefore gated: the
first ungated_prefix frames (default 1 — the setupComplete handshake)
are delivered immediately so the connection can reach Active, and the
rest are held until ReplayControl::release is called. Once the inbound
queue is exhausted the ReplayControl::drained signal fires and recv()
pends (like MockTransport), keeping the
session alive until it is disconnected.
Structs§
- Replay
Control - Control handle for a
ReplayTransportthat has been moved into a session loop. - Replay
Transport - A
Transportthat replays recorded inbound frames and collects outbound frames. See the module docs for gating and drain semantics.
Enums§
- Replay
Transport Error - Errors from the
ReplayTransport.
Type Aliases§
- Outbound
Frames - Shared collection of frames “sent” during a replay.