pub struct CubicController { /* private fields */ }Expand description
TCP Cubic congestion controller (RFC 8312).
Cubic uses a cubic function of elapsed time since the last congestion event to set the congestion window, providing better bandwidth utilization on high-BDP networks than Reno while remaining TCP-friendly on low-BDP paths.
Implementations§
Source§impl CubicController
impl CubicController
Sourcepub fn state(&self) -> &CongestionState
pub fn state(&self) -> &CongestionState
Access the underlying congestion state.
Sourcepub fn phase(&self) -> CongestionPhase
pub fn phase(&self) -> CongestionPhase
Return the current congestion phase.
Sourcepub fn dup_ack_count(&self) -> u32
pub fn dup_ack_count(&self) -> u32
Return the duplicate ACK count.
Trait Implementations§
Source§impl Clone for CubicController
impl Clone for CubicController
Source§fn clone(&self) -> CubicController
fn clone(&self) -> CubicController
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl CongestionController for CubicController
impl CongestionController for CubicController
Source§fn on_ack(&mut self, bytes_acked: u32, rtt_us: u64)
fn on_ack(&mut self, bytes_acked: u32, rtt_us: u64)
Called when new data is acknowledged. Read more
Source§fn on_duplicate_ack(&mut self)
fn on_duplicate_ack(&mut self)
Called when a duplicate ACK is received.
Source§fn on_timeout(&mut self)
fn on_timeout(&mut self)
Called when a retransmission timeout fires.
Source§fn congestion_window(&self) -> u32
fn congestion_window(&self) -> u32
Returns the current congestion window in bytes.
Source§fn slow_start_threshold(&self) -> u32
fn slow_start_threshold(&self) -> u32
Returns the current slow-start threshold in bytes.
Source§impl Debug for CubicController
impl Debug for CubicController
Auto Trait Implementations§
impl Freeze for CubicController
impl RefUnwindSafe for CubicController
impl Send for CubicController
impl Sync for CubicController
impl Unpin for CubicController
impl UnwindSafe for CubicController
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)