pub struct CccConnection {
pub id: CccConnId,
pub cwnd: u64,
pub ssthresh: u64,
pub state: CccState,
pub rtt_ms: f64,
pub rtt_var: f64,
pub in_flight: u64,
pub bytes_acked: u64,
pub bytes_lost: u64,
pub last_ts: u64,
/* private fields */
}Expand description
Per-connection congestion state.
Fields§
§id: CccConnIdUnique connection identifier.
cwnd: u64Current congestion window (bytes).
ssthresh: u64Slow-start threshold (bytes).
state: CccStateCurrent FSM state.
rtt_ms: f64Smoothed RTT (ms), exponential weighted moving average.
rtt_var: f64RTT variance (ms).
in_flight: u64Bytes currently in flight.
bytes_acked: u64Total bytes acknowledged.
bytes_lost: u64Total bytes lost.
last_ts: u64Timestamp of the last event (monotonic ms counter, internal).
Implementations§
Source§impl CccConnection
impl CccConnection
Sourcepub fn apply_cwnd_jitter(&mut self, min_cwnd: u64, max_cwnd: u64)
pub fn apply_cwnd_jitter(&mut self, min_cwnd: u64, max_cwnd: u64)
Apply a small random jitter (±1 %) to the congestion window.
Used by algorithms that need to break synchronisation among multiple
flows. The magnitude is bounded so cwnd never leaves [min, max].
Trait Implementations§
Source§impl Clone for CccConnection
impl Clone for CccConnection
Source§fn clone(&self) -> CccConnection
fn clone(&self) -> CccConnection
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CccConnection
impl RefUnwindSafe for CccConnection
impl Send for CccConnection
impl Sync for CccConnection
impl Unpin for CccConnection
impl UnsafeUnpin for CccConnection
impl UnwindSafe for CccConnection
Blanket Implementations§
impl<T> Allocation for T
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
Mutably borrows from an owned value. Read more
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more