Contract between the protocol-neutral connection runtime and one concrete MOQT-family protocol implementation.
Implementations own their wire messages, codecs, lifecycle, capabilities,
commands, events, and error semantics. The runtime owns the
MOQX.Transport context and applies the transport actions returned in
MOQX.Protocol.Transition values.
An explicit {:attempt_actions, key, actions} batch reports its first failure
or success immediately through handle_transport/2 as {:action_result, key, result}. The runtime reports mechanics only; the protocol owns the meaning
and recovery transition. Ordinary actions remain fail-fast, with application
events emitted only after their transition actions succeed.
Summary
Functions
Returns whether a module exports the complete protocol implementation contract.
Types
@type action_result() :: :ok | {:error, term()}
@type id() :: :cloudflare_draft_14 | :draft_16
@type runtime_event() :: {:runtime_timeout, term()} | {:action_result, term(), action_result()}
@type state() :: term()
Callbacks
@callback capabilities(state()) :: MOQX.Protocol.Capabilities.t()
@callback handle_operation(state(), MOQX.Operation.t()) :: MOQX.Protocol.Transition.result()
@callback handle_transport(state(), MOQX.Transport.event() | runtime_event()) :: MOQX.Protocol.Transition.result()
@callback transport_spec(endpoint :: URI.t(), options :: keyword()) :: {:ok, MOQX.Protocol.TransportSpec.t()} | {:error, term()}