pub struct Listener { /* private fields */ }Expand description
Listens for incoming plain-TCP qmux connections on a TCP port.
Implementations§
Source§impl Listener
impl Listener
Sourcepub async fn bind(addr: SocketAddr) -> Result<Self, Error>
pub async fn bind(addr: SocketAddr) -> Result<Self, Error>
Bind a TCP listener to the given address.
Sourcepub fn with_protocols<I, S>(self, protocols: I) -> Self
pub fn with_protocols<I, S>(self, protocols: I) -> Self
Advertise these application protocols (moq ALPNs) for in-band negotiation, in preference order. The first server entry the client also offers wins.
Sourcepub fn local_addr(&self) -> Result<SocketAddr, Error>
pub fn local_addr(&self) -> Result<SocketAddr, Error>
The local address the listener is bound to.
Auto Trait Implementations§
impl !Freeze for Listener
impl RefUnwindSafe for Listener
impl Send for Listener
impl Sync for Listener
impl Unpin for Listener
impl UnsafeUnpin for Listener
impl UnwindSafe for Listener
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