Certificate-based QUIC v1 reliable streams with bounded pull consumption.
See docs/consumer-contract.md for ownership, generation handles, deadlines,
admission outcomes and limitations. ALPN is metadata; application protocols
are provided by consumers.
Endpoints created with listen/1 or client/1 accept idle_timeout as
positive milliseconds (default 30_000) or :infinity. The latter advertises
a disabled local idle limit; both endpoints must disable their limits to avoid
a finite idle timer. A peer's finite limit still applies. Handshake, operation,
closing and draining deadlines remain finite. info/1 and ready metadata expose
idle_timeout with local_ms, peer_ms, negotiated_ms, and effective_ms
(milliseconds or :infinity); the effective period includes a three-PTO floor.
Callers can use ping/2 at a finite cadence below the peer limit. Admission is
not a peer ACK, and repeated sends without processing peer packets cannot
postpone local idle expiry indefinitely. No automatic keepalive task is created.
Summary
Functions
Admit one QUIC PING for caller-managed keepalive.
Types
Functions
@spec accept(pid(), non_neg_integer() | operation_options()) :: {:ok, Quic.Runtime.ConnectionHandle.t()} | failure()
@spec capabilities() :: %{
datagram: true,
delivery: :pull,
http3: false,
io: [:external | :standalone, ...],
max_write_bytes: 16384,
migration: %{peer: [:server, ...], local: []},
resumption: false,
streams: [:bidi | :uni, ...],
version: 1
}
@spec client(keyword()) :: GenServer.on_start()
@spec close( Quic.Runtime.ConnectionHandle.t(), non_neg_integer(), binary(), operation_options() ) :: :ok | failure()
@spec connect(pid(), {:inet.ip_address(), :inet.port_number()}, operation_options()) :: {:ok, Quic.Runtime.ConnectionHandle.t()} | failure()
@spec events(Quic.Runtime.ConnectionHandle.t(), pos_integer(), operation_options()) :: {:ok, list()} | failure()
@spec listen(keyword()) :: GenServer.on_start()
@spec local(pid()) :: {:inet.ip_address(), :inet.port_number()} | {:error, term()}
@spec open_stream( Quic.Runtime.ConnectionHandle.t(), :bidi | :uni, operation_options() ) :: {:ok, Quic.Runtime.StreamHandle.t()} | failure()
@spec ping(Quic.Runtime.ConnectionHandle.t(), operation_options()) :: {:ok, reference()} | failure()
Admit one QUIC PING for caller-managed keepalive.
Uses the same finite operation deadlines, deduplication, bounded send queue and
recovery as stream sends. {:ok, ref} reports admission, not peer receipt or ACK.
Choose a finite cadence below the peer's advertised idle limit, available in
info/1. Sending without successfully processing peer packets cannot postpone
local idle expiry indefinitely. No periodic task or timer is created.
@spec read(Quic.Runtime.StreamHandle.t(), pos_integer(), operation_options()) :: {:ok, list()} | failure()
@spec read_datagrams( Quic.Runtime.ConnectionHandle.t(), pos_integer(), operation_options() ) :: {:ok, [binary()]} | failure()
@spec ready(Quic.Runtime.ConnectionHandle.t()) :: :ready | :pending | failure()
@spec reset_stream( Quic.Runtime.StreamHandle.t(), non_neg_integer(), operation_options() ) :: {:ok, reference()} | failure()
@spec send_datagram(Quic.Runtime.ConnectionHandle.t(), binary(), operation_options()) :: {:ok, reference()} | failure()
@spec send_stream( Quic.Runtime.StreamHandle.t(), binary(), boolean(), operation_options() ) :: {:ok, reference()} | failure()
@spec stop_stream( Quic.Runtime.StreamHandle.t(), non_neg_integer(), operation_options() ) :: {:ok, reference()} | failure()