Pure bounded endpoint state for QUIC external IO.
The first UDP adapter binds a concrete local address. Wildcard and
ancillary destination/interface metadata are intentionally unsupported.
enqueue/4 is admission only; local_send/4 reports the later local
writer result. Peer ACKs belong to Quic.Recovery, never this IO budget.
At most two paths retain independent received, reserved, and spent byte ledgers. The legacy arities use the selected path, while top-level byte counters remain lifetime totals across paths. Send receipts retain the path chosen at admission even if the selected path subsequently changes.
Summary
Functions
The path's independent amplification ledger, or nil after retirement.
Selected path used by the legacy IO arities.
Types
@type initial_state() :: %Quic.IO.Endpoint{ active_path: path_id(), address_validated: false, bytes_pending: 0, bytes_received: 0, bytes_sent: 0, closed: false, generation: 0, handshake_deadline: term(), idle_deadline: term(), in_flight: %{}, max_queue: pos_integer(), max_queue_bytes: pos_integer(), paths: %{required(path_id()) => path_ledger()}, queue: {[], []}, queue_bytes: 0, timers: %{} }
@type path_id() :: term()
@type path_ledger() :: %{ bytes_received: non_neg_integer(), bytes_pending: non_neg_integer(), bytes_sent: non_neg_integer(), address_validated: boolean() }
@type send_ref() :: reference()
@type t() :: %Quic.IO.Endpoint{ active_path: term(), address_validated: boolean(), bytes_pending: term(), bytes_received: non_neg_integer(), bytes_sent: term(), closed: term(), generation: term(), handshake_deadline: term(), idle_deadline: term(), in_flight: term(), max_queue: term(), max_queue_bytes: term(), paths: %{optional(path_id()) => path_ledger()}, queue: term(), queue_bytes: term(), timers: term() }
Functions
@spec new(keyword()) :: {:ok, initial_state()} | {:error, {:max_queue | :max_queue_bytes, :must_be_positive}}
@spec path(t(), path_id()) :: path_ledger() | nil
The path's independent amplification ledger, or nil after retirement.
@spec receive_bytes(t(), non_neg_integer(), path_id()) :: {:ok, t()} | {:error, :unknown_path}
Selected path used by the legacy IO arities.