pub trait Acceptor: Send {
type Io: AsyncRead + AsyncWrite + Send + Unpin + 'static;
fn local_addr(&self) -> Vec<LocalAddr>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
;
fn accept<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = IoResult<(Self::Io, LocalAddr, RemoteAddr, Scheme)>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
}
Expand description
Represents a acceptor type.
Associated Types
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
sourceimpl<T: Acceptor + ?Sized> Acceptor for Box<T>
impl<T: Acceptor + ?Sized> Acceptor for Box<T>
type Io = T::Io
fn local_addr(&self) -> Vec<LocalAddr>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
fn accept<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = IoResult<(Self::Io, LocalAddr, RemoteAddr, Scheme)>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
sourceimpl Acceptor for Infallible
impl Acceptor for Infallible
type Io = BoxIo
fn local_addr(&self) -> Vec<LocalAddr>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
fn accept<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = IoResult<(Self::Io, LocalAddr, RemoteAddr, Scheme)>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Implementors
sourceimpl Acceptor for TcpAcceptor
impl Acceptor for TcpAcceptor
sourceimpl Acceptor for UnixAcceptor
impl Acceptor for UnixAcceptor
type Io = UnixStream
sourceimpl<A: Acceptor, B: Acceptor> Acceptor for Combined<A, B>
impl<A: Acceptor, B: Acceptor> Acceptor for Combined<A, B>
type Io = CombinedStream<A::Io, B::Io>
sourceimpl<T, S> Acceptor for NativeTlsAcceptor<T, S> where
S: Stream<Item = NativeTlsConfig> + Send + Unpin + 'static,
T: Acceptor,
impl<T, S> Acceptor for NativeTlsAcceptor<T, S> where
S: Stream<Item = NativeTlsConfig> + Send + Unpin + 'static,
T: Acceptor,
type Io = HandshakeStream<TlsStream<T::Io>>
sourceimpl<T, S> Acceptor for RustlsAcceptor<T, S> where
S: Stream<Item = RustlsConfig> + Send + Unpin + 'static,
T: Acceptor,
impl<T, S> Acceptor for RustlsAcceptor<T, S> where
S: Stream<Item = RustlsConfig> + Send + Unpin + 'static,
T: Acceptor,
type Io = HandshakeStream<TlsStream<T::Io>>
sourceimpl<T: Acceptor> Acceptor for AutoCertAcceptor<T>
This is supported on crate feature acme
only.
impl<T: Acceptor> Acceptor for AutoCertAcceptor<T>
This is supported on crate feature
acme
only.