pub struct QuicMonitor { /* private fields */ }Expand description
QUIC connection monitor
Implementations§
Source§impl QuicMonitor
impl QuicMonitor
Sourcepub fn new(config: QuicConfig) -> Self
pub fn new(config: QuicConfig) -> Self
Create a new QUIC monitor
Sourcepub fn config(&self) -> &QuicConfig
pub fn config(&self) -> &QuicConfig
Get configuration
Sourcepub fn record_connection_established(
&self,
remote_addr: SocketAddr,
used_0rtt: bool,
)
pub fn record_connection_established( &self, remote_addr: SocketAddr, used_0rtt: bool, )
Record connection established
Sourcepub fn record_connection_closed(&self, remote_addr: &SocketAddr)
pub fn record_connection_closed(&self, remote_addr: &SocketAddr)
Record connection closed
Sourcepub fn record_connection_failed(&self, remote_addr: &SocketAddr)
pub fn record_connection_failed(&self, remote_addr: &SocketAddr)
Record connection failed
Sourcepub fn update_rtt(&self, remote_addr: &SocketAddr, rtt: Duration)
pub fn update_rtt(&self, remote_addr: &SocketAddr, rtt: Duration)
Update connection RTT
Sourcepub fn update_bytes(&self, remote_addr: &SocketAddr, sent: u64, received: u64)
pub fn update_bytes(&self, remote_addr: &SocketAddr, sent: u64, received: u64)
Update connection bytes
Sourcepub fn update_streams(&self, remote_addr: &SocketAddr, bidi: u64, uni: u64)
pub fn update_streams(&self, remote_addr: &SocketAddr, bidi: u64, uni: u64)
Update stream counts
Sourcepub fn record_migration(&self, remote_addr: &SocketAddr)
pub fn record_migration(&self, remote_addr: &SocketAddr)
Record connection migration
Sourcepub fn get_connection(
&self,
remote_addr: &SocketAddr,
) -> Option<QuicConnectionInfo>
pub fn get_connection( &self, remote_addr: &SocketAddr, ) -> Option<QuicConnectionInfo>
Get connection info
Sourcepub fn get_active_connections(&self) -> Vec<QuicConnectionInfo>
pub fn get_active_connections(&self) -> Vec<QuicConnectionInfo>
Get all active connections
Sourcepub fn active_connection_count(&self) -> usize
pub fn active_connection_count(&self) -> usize
Get number of active connections
Sourcepub fn reset_stats(&self)
pub fn reset_stats(&self)
Clear all statistics
Trait Implementations§
Source§impl Debug for QuicMonitor
impl Debug for QuicMonitor
Auto Trait Implementations§
impl Freeze for QuicMonitor
impl !RefUnwindSafe for QuicMonitor
impl Send for QuicMonitor
impl Sync for QuicMonitor
impl Unpin for QuicMonitor
impl !UnwindSafe for QuicMonitor
Blanket Implementations§
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
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