struct Shared {
ping_pong: PingPong,
ping_sent_at: Option<Instant>,
bytes: Option<usize>,
next_bdp_at: Option<Instant>,
last_read_at: Option<Instant>,
is_keep_alive_timed_out: bool,
}
Fields§
§ping_pong: PingPong
§ping_sent_at: Option<Instant>
§bytes: Option<usize>
If Some
, bdp is enabled, and this tracks how many bytes have been
read during the current sample.
next_bdp_at: Option<Instant>
We delay a variable amount of time between BDP pings. This allows us to send less pings as the bandwidth stabilizes.
last_read_at: Option<Instant>
If Some
, keep-alive is enabled, and the Instant is how long ago
the connection read the last frame.
is_keep_alive_timed_out: bool
Implementations§
fn send_ping(&mut self)
fn is_ping_sent(&self) -> bool
fn update_last_read_at(&mut self)
fn last_read_at(&self) -> Instant
Auto Trait Implementations§
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