Quic.Paths (elixir_quic v1.0.0-rc.9)

Copy Markdown View Source

Bounded authenticated path selection and explicit-time validation.

Summary

Types

id()

@type id() :: :default | pos_integer()

t()

@type t() :: %Quic.Paths{
  active: term(),
  candidate: term(),
  largest_non_probing: term(),
  local: term(),
  next_id: term(),
  paths: term(),
  previous: term(),
  retiring: term(),
  role: term()
}

Functions

drop(state, id)

@spec drop(t(), id()) :: {:ok, t()} | {:error, :active_path}

due(state, at)

@spec due(t(), integer()) :: [id()]

lookup(state, remote)

@spec lookup(t(), term()) :: {:ok, id()} | :error

new(role, local, remote, validated)

@spec new(:client | :server, term(), term(), boolean()) :: t()

next_deadline(state)

@spec next_deadline(t()) :: integer() | nil

note_cid(state, id, dcid, number)

@spec note_cid(t(), id(), binary(), non_neg_integer()) :: t()

Remember the latest authenticated incoming CID without accepting reordered changes.

observe(state, remote, number, probing, at, pto)

@spec observe(t(), term(), non_neg_integer(), boolean(), integer(), pos_integer()) ::
  {:ok, t(), id(), boolean()} | {:blocked, atom()}

on_time(state, at, available \\ :all)

@spec on_time(t(), integer(), :all | [id()]) ::
  {:ok, t(), id() | nil} | {:error, :no_validated_path}

probe(state, id, value, padded, at, pto)

@spec probe(t(), id(), binary(), boolean(), integer(), pos_integer()) ::
  {:ok, t()} | {:error, atom()}

response(state, value, at)

@spec response(t(), binary(), integer()) :: {:ok, t(), id()} | :ignore

validate(state, id)

@spec validate(t(), id()) :: t()