Quic.Congestion.NewReno (elixir_quic v0.16.7)

Copy Markdown View Source

Pure RFC 9002-style NewReno congestion controller.

Admission is reservation based: queued datagrams consume congestion credit until they are definitively failed, acknowledged, or declared lost.

Summary

Types

initial_state()

@type initial_state() :: %Quic.Congestion.NewReno{
  acked_bytes: 0,
  bytes_in_flight: 0,
  cwnd: term(),
  max_datagram_size: term(),
  mss: number(),
  ssthresh: term()
}

t()

@type t() :: %Quic.Congestion.NewReno{
  acked_bytes: term(),
  bytes_in_flight: term(),
  cwnd: term(),
  max_datagram_size: term(),
  mss: term(),
  ssthresh: term()
}

Functions

available?(new_reno, bytes)

@spec available?(t(), non_neg_integer()) :: boolean()

new(opts \\ [])

@spec new(keyword()) :: initial_state()

on_ack(state, bytes)

@spec on_ack(t(), non_neg_integer()) :: t()

on_loss(state, bytes)

@spec on_loss(t(), non_neg_integer()) :: t()

pacing_delay(new_reno, rtt_us)

@spec pacing_delay(t(), non_neg_integer()) :: non_neg_integer()

release(state, bytes)

@spec release(t(), non_neg_integer()) :: t()

reserve(state, bytes)

@spec reserve(t(), non_neg_integer()) :: {:ok, t()} | {:error, :congestion_limited}