pub struct CubicCongestionController { /* private fields */ }
Expand description

A congestion controller that implements “CUBIC for Fast Long-Distance Networks” as specified in https://tools.ietf.org/html/rfc8312. The Hybrid Slow Start algorithm is used for determining the slow start threshold.

Implementations§

source§

impl CubicCongestionController

source

pub fn new(max_datagram_size: u16) -> Self

Trait Implementations§

source§

impl Clone for CubicCongestionController

source§

fn clone(&self) -> CubicCongestionController

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl CongestionController for CubicCongestionController

§

type PacketInfo = ()

Additional metadata about a packet to track until a sent packet is either acknowledged or declared lost
source§

fn congestion_window(&self) -> u32

Returns the size of the current congestion window in bytes
source§

fn bytes_in_flight(&self) -> u32

Returns the current bytes in flight
source§

fn is_congestion_limited(&self) -> bool

Returns true if the congestion window does not have sufficient space for a packet of max_datagram_size considering the current bytes in flight
source§

fn requires_fast_retransmission(&self) -> bool

Returns true if the current state of the congestion controller requires a packet to be transmitted without respecting the available congestion window
source§

fn on_packet_sent<Pub: Publisher>( &mut self, time_sent: Timestamp, bytes_sent: usize, app_limited: Option<bool>, rtt_estimator: &RttEstimator, publisher: &mut Pub )

Invoked when a packet is sent Read more
source§

fn on_rtt_update<Pub: Publisher>( &mut self, time_sent: Timestamp, now: Timestamp, rtt_estimator: &RttEstimator, publisher: &mut Pub )

Invoked each time the round trip time is updated, which is whenever the newest acknowledged packet in an ACK frame is newly acknowledged
source§

fn on_ack<Pub: Publisher>( &mut self, newest_acked_time_sent: Timestamp, bytes_acknowledged: usize, _newest_acked_packet_info: Self::PacketInfo, rtt_estimator: &RttEstimator, _random_generator: &mut dyn Generator, ack_receive_time: Timestamp, publisher: &mut Pub )

Invoked when an acknowledgement of one or more previously unacknowledged packets is received Read more
source§

fn on_packet_lost<Pub: Publisher>( &mut self, lost_bytes: u32, _packet_info: Self::PacketInfo, persistent_congestion: bool, _new_loss_burst: bool, _random_generator: &mut dyn Generator, timestamp: Timestamp, publisher: &mut Pub )

Invoked when a packet is declared lost Read more
source§

fn on_explicit_congestion<Pub: Publisher>( &mut self, _ce_count: u64, event_time: Timestamp, publisher: &mut Pub )

Invoked when the Explicit Congestion Notification counter increases. Read more
source§

fn on_mtu_update<Pub: Publisher>( &mut self, max_datagram_size: u16, _publisher: &mut Pub )

Invoked when the path maximum transmission unit is updated.
source§

fn on_packet_discarded<Pub: Publisher>( &mut self, bytes_sent: usize, _publisher: &mut Pub )

Invoked for each packet discarded when a packet number space is discarded.
source§

fn earliest_departure_time(&self) -> Option<Timestamp>

Returns the earliest time that a packet may be transmitted. Read more
source§

fn send_quantum(&self) -> Option<usize>

The maximum number of bytes for an aggregation of packets scheduled and transmitted together. Read more
source§

impl Debug for CubicCongestionController

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T, U> Upcast<T> for U
where T: UpcastFrom<U>,

source§

fn upcast(self) -> T

source§

impl<T, B> UpcastFrom<Counter<T, B>> for T

source§

fn upcast_from(value: Counter<T, B>) -> T