pub enum Congestion {
Bbr3,
Cubic,
NewReno,
}Expand description
A QUIC congestion controller.
MoqPreset binds an endpoint with Bbr3, which keeps
moq-net’s send-rate estimate on the link. The others are there to compare
against. An endpoint uses one controller for every connection, and
one dial can take another by setting
transport_config in
ConnectOptions::quic.
It parses from its name in any case, and displays as that name.
use iroh_live_node::Congestion;
let congestion: Congestion = "cubic".parse().expect("a known controller");
assert_eq!(congestion, Congestion::Cubic);
assert_eq!(congestion.to_string(), "CUBIC");Variants§
Bbr3
BBR3, which paces to the delivery rate it measures.
Cubic
CUBIC, iroh’s own default, which grows its window until a packet is lost.
NewReno
NewReno, the classic loss-based controller.
Implementations§
Source§impl Congestion
impl Congestion
Sourcepub fn transport_config(self) -> QuicTransportConfig
pub fn transport_config(self) -> QuicTransportConfig
Returns a QUIC transport config with this controller and iroh’s other defaults.
Pass it to an endpoint builder’s transport_config, or to one dial in
iroh::endpoint::ConnectOptions.
With the qlog feature, the config writes a qlog trace of every
connection into the directory the QLOGDIR environment variable names.
This call reads QLOGDIR and creates the directory, so setting it
afterwards has no effect, and without it nothing is written.
Each side writes one file per connection, named
iroh-live-<unix ms>-<connection id>-<client|server>.qlog. The
connection id is the client’s first destination id, so both ends of a
connection name their file with the same id.
The traces log every packet, so a file grows about as large as the
data its connection sends, and nothing rotates or caps them. They
also hold the peers’ IP addresses. QLOGDIR is a shared name that
quiche, ngtcp2 and curl read too, so set it only while you diagnose.
Trait Implementations§
Source§impl Clone for Congestion
impl Clone for Congestion
impl Copy for Congestion
Source§impl Debug for Congestion
impl Debug for Congestion
Source§impl Default for Congestion
impl Default for Congestion
Source§impl Display for Congestion
impl Display for Congestion
impl Eq for Congestion
Source§impl FromStr for Congestion
impl FromStr for Congestion
Source§impl Hash for Congestion
impl Hash for Congestion
Source§impl PartialEq for Congestion
impl PartialEq for Congestion
impl StructuralPartialEq for Congestion
Auto Trait Implementations§
impl Freeze for Congestion
impl RefUnwindSafe for Congestion
impl Send for Congestion
impl Sync for Congestion
impl Unpin for Congestion
impl UnsafeUnpin for Congestion
impl UnwindSafe for Congestion
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.