pub struct CongestionControl { /* private fields */ }
Implementations§
Source§impl CongestionControl
impl CongestionControl
pub fn new(mss: usize, config: &Config) -> Self
pub fn on_sent(&mut self, now: Timestamp, bytes: u64, last_packet_number: u64)
pub fn cwnd(&self) -> u64
pub fn rto(&self) -> Duration
pub fn rtt(&self) -> Duration
pub fn on_estimate( &mut self, est_rtt: Duration, est_delay: Duration, app_limited: bool, )
pub fn on_ack( &mut self, flight: u64, ack: u64, largest_packet_num_acked: Option<u64>, sent_time: Timestamp, app_limited: bool, )
pub fn on_loss(&mut self, lost: u64)
pub fn on_no_resp(&mut self, lost: u64)
pub fn on_time_escape(&mut self, now: Timestamp)
pub fn rate(&self) -> u64
Auto Trait Implementations§
impl Freeze for CongestionControl
impl !RefUnwindSafe for CongestionControl
impl Send for CongestionControl
impl !Sync for CongestionControl
impl Unpin for CongestionControl
impl !UnwindSafe for CongestionControl
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
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