pub struct Listener { /* private fields */ }Expand description
Listens for incoming WebSocket connections on a TCP port.
Use with crate::Server::with_websocket to accept WebSocket connections
alongside QUIC connections on a separate port.
Implementations§
Source§impl Listener
impl Listener
pub async fn bind(addr: SocketAddr) -> Result<Self, Error>
pub async fn bind_with_alpns( addr: SocketAddr, alpns: &[&str], ) -> Result<Self, Error>
pub fn local_addr(&self) -> Result<SocketAddr, Error>
pub async fn accept(&self) -> Option<Result<Session, Error>>
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