Struct s2n_quic_core::recovery::cubic::CubicCongestionController
source · 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§
Trait Implementations§
source§impl Clone for CubicCongestionController
impl Clone for CubicCongestionController
source§fn clone(&self) -> CubicCongestionController
fn clone(&self) -> CubicCongestionController
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl CongestionController for CubicCongestionController
impl CongestionController for CubicCongestionController
§type PacketInfo = ()
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
fn congestion_window(&self) -> u32
Returns the size of the current congestion window in bytes
source§fn bytes_in_flight(&self) -> u32
fn bytes_in_flight(&self) -> u32
Returns the current bytes in flight
source§fn is_congestion_limited(&self) -> bool
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 flightsource§fn requires_fast_retransmission(&self) -> bool
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 windowsource§fn on_packet_sent<Pub: Publisher>(
&mut self,
time_sent: Timestamp,
bytes_sent: usize,
app_limited: Option<bool>,
rtt_estimator: &RttEstimator,
publisher: &mut Pub
)
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
)
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
)
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
)
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
)
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
)
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
)
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.
Auto Trait Implementations§
impl Freeze for CubicCongestionController
impl RefUnwindSafe for CubicCongestionController
impl Send for CubicCongestionController
impl Sync for CubicCongestionController
impl Unpin for CubicCongestionController
impl UnwindSafe for CubicCongestionController
Blanket Implementations§
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
Mutably borrows from an owned value. Read more