Trait poem::listener::Acceptor[][src]

pub trait Acceptor: Send + Sync {
    type Io: AsyncRead + AsyncWrite + Send + Unpin + 'static;
    fn local_addr(&self) -> IoResult<Vec<RemoteAddr>>;
fn accept<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = IoResult<(Self::Io, RemoteAddr)>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; }
Expand description

Represents a acceptor type.

Associated Types

IO stream type.

Required methods

Returns the local address that this listener is bound to.

Accepts a new incoming connection from this listener.

This function will yield once a new TCP connection is established. When established, the corresponding IO stream and the remote peer’s address will be returned.

Implementations on Foreign Types

Implementors