pub struct QuicListener {
    pub socket: UdpSocket,
    pub socket_cookie: u64,
    pub capabilities: SocketCapabilities,
}Expand description
Wrapper around a [UdpSocket] for server-side QUIC connections.
The wrapper carries socket-specific parameters, in contrast to the
settings structs which apply to all sockets
for a given QUIC server.
To create a QuicListener, you may either instantiate the struct yourself
or use one of the TryFrom implementations.
Fields§
§socket: UdpSocketThe wrapped [tokio] socket.
An opaque value that is later passed to the
ConnectionIdGenerator.
capabilities: SocketCapabilitiesThe SocketCapabilities to use for this socket.
By default, QuicListeners are constructed with all capabilities
disabled. On Linux, you can use apply_max_capabilities() to (try
to) enable all supported capabilities.
Implementations§
Source§impl QuicListener
 
impl QuicListener
Sourcepub fn apply_max_capabilities(&mut self)
 
pub fn apply_max_capabilities(&mut self)
Tries to enable all sockopts supported by the crate for this socket.
See SocketCapabilities::apply_all_and_get_compatibility for details.
Trait Implementations§
Source§impl AsFd for QuicListener
Available on Unix only. 
impl AsFd for QuicListener
Source§fn as_fd(&self) -> BorrowedFd<'_>
 
fn as_fd(&self) -> BorrowedFd<'_>
Source§impl AsRawFd for QuicListener
Available on Unix only. 
impl AsRawFd for QuicListener
Source§impl Debug for QuicListener
 
impl Debug for QuicListener
Source§impl TryFrom<UdpSocket> for QuicListener
 
impl TryFrom<UdpSocket> for QuicListener
Auto Trait Implementations§
impl !Freeze for QuicListener
impl RefUnwindSafe for QuicListener
impl Send for QuicListener
impl Sync for QuicListener
impl Unpin for QuicListener
impl UnwindSafe for QuicListener
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