pub struct QuicConnection { /* private fields */ }
Expand description
Metadata about an established QUIC connection.
While this struct allows access to some facets of a QUIC connection, it
notably does not represent the [quiche::Connection] itself. The crate
handles most interactions with [quiche] internally in a worker task. Users
can only access the connection directly via their ApplicationOverQuic
implementation.
See the module-level docs for an overview of how a QUIC connection is handled internally.
Implementations§
Source§impl QuicConnection
impl QuicConnection
Sourcepub fn local_addr(&self) -> SocketAddr
pub fn local_addr(&self) -> SocketAddr
The local address this connection listens on.
Sourcepub fn peer_addr(&self) -> SocketAddr
pub fn peer_addr(&self) -> SocketAddr
The remote address for this connection.
Sourcepub fn audit_log_stats(&self) -> &Arc<QuicAuditStats>
pub fn audit_log_stats(&self) -> &Arc<QuicAuditStats>
A handle to the QuicAuditStats
for this connection.
§Note
These stats are updated during the lifetime of the connection. The getter exists to grab a handle early on, which can then be stowed away and read out after the connection has closed.
Sourcepub fn stats(&self) -> &Arc<Mutex<QuicConnectionStats>>
pub fn stats(&self) -> &Arc<Mutex<QuicConnectionStats>>
A handle to the QuicConnectionStats
for this connection.
§Note
Initially, these stats represent the state when the [quiche::Connection] was created. They are updated when the connection is closed, so this getter exists primarily to grab a handle early on.
Trait Implementations§
Source§impl AsSocketStats for QuicConnection
impl AsSocketStats for QuicConnection
fn as_socket_stats(&self) -> SocketStats
fn as_quic_stats(&self) -> Option<&Arc<QuicAuditStats>>
Source§impl ShutdownConnection for QuicConnection
impl ShutdownConnection for QuicConnection
Auto Trait Implementations§
impl Freeze for QuicConnection
impl RefUnwindSafe for QuicConnection
impl Send for QuicConnection
impl Sync for QuicConnection
impl Unpin for QuicConnection
impl UnwindSafe for QuicConnection
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
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>
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>
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