Available on crate feature
std only.Expand description
Phantom Protocol - Stream Management
Independently-flow-controlled, reliability-segmented data channels multiplexed
within one session. Each Stream owns its own send/receive buffers, gap-free
reliable offset space (A.5), SACK-driven loss detection (RFC 9002), RFC-6298 RTO
estimator, and credit-based flow-control windows. Per-stream sequencing means a
stall or loss on one stream does not head-of-line-block any other stream (HoL
blocking still applies within a stream — reliable data is delivered strictly
in send order via accept_in_order).
Structs§
- Lost
Segment - One segment newly declared lost by
Stream::on_sack’s RFC-9002 loss detector (L1-B) — still buffered, now flagged for fast-retransmit. - Outbound
Segment - One segment handed back by
Stream::poll_sendfor transmission. - Retired
Segment - One reliable segment retired by
Stream::on_sack— a segment whose sequence a received SACK covered and which has now been removed from the send buffer. - Sack
Result - Outcome of processing a received SACK against the send buffer.
- Stream
- Stream - multiplexed data channel within a session
Enums§
- Stream
State - Stream state
Constants§
- INITIAL_
STREAM_ WINDOW - Initial per-stream send window — caps how many bytes the local
side will put on the wire before receiving a
WINDOW_UPDATEfrom the peer. 64 KiB matches QUIC’s stream initial-window default. - MAX_
RECV_ REORDER_ BYTES - Per-stream byte budget for the out-of-order reorder buffer (H-3), tied to the flow-control
window. A compliant peer keeps in-flight (hence reorderable) data within ~one
INITIAL_STREAM_WINDOW; the 2× headroom absorbs a boundary segment. A future hole that would push the buffered total past this is refused (dropped → retransmitted via the “refused segment is not SACKed” contract), so per-stream reorder memory is bounded regardless of the per-entry frame size (~253 KiB UDP / 4 MiB TCP) — the entry cap alone is not, since one entry can dwarf the window. - MAX_
SEND_ WINDOW - Hard ceiling on the credit-based send window.
WINDOW_UPDATEframes add relative credit; this caps the accumulated window so a peer that floods inflated credits cannot overflow the counter. A compliant peer never grants more than ~oneINITIAL_STREAM_WINDOWof outstanding credit, so the cap is only a misbehaving-peer guard (the receiver’s own delivery HARD_CAP is the real bound on buffering).