Expand description
Per-flow UDP state machine (sans-io).
A UdpFlow is the per-admitted-flow half of the two-level split. It owns
the three-knob teardown counters (responses / requests / idle), the idle
and lifetime deadlines, PPv2-first-datagram bookkeeping, the real (pre-NAT)
client address, the chosen backend, and the forward/return decisions. It
carries a timer_gen generation token so a stale wheel expiry cannot close
a flow that has since seen traffic.
No socket, no clock, no rand: every time-dependent method takes now: Instant. The manager owns the slab; this type is the slot payload.
Structs§
- UdpFlow
- Per-admitted-flow state. Slab slot payload owned by the manager.
Enums§
- Close
Reason - Why a flow reached teardown. Surfaces in the access log on close.
- Flow
Phase - The lifecycle of a flow w.r.t. its backend. A flow is admitted in
AwaitingBackend, transitions toEstablishedonce the shell resolves and opens an upstream, and is reaped on teardown.