Trait tls_listener::AsyncAccept
source · [−]pub trait AsyncAccept {
type Connection: AsyncRead + AsyncWrite;
type Error;
fn poll_accept(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Result<Self::Connection, Self::Error>>;
}
Expand description
Asynchronously accept connections.
Associated Types
type Connection: AsyncRead + AsyncWrite
type Connection: AsyncRead + AsyncWrite
The type of the connection that is accepted.
Required methods
fn poll_accept(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Result<Self::Connection, Self::Error>>
fn poll_accept(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Result<Self::Connection, Self::Error>>
Poll to accept the next connection.
Implementations on Foreign Types
sourceimpl AsyncAccept for TcpListener
This is supported on crate feature tokio-net
only.
impl AsyncAccept for TcpListener
This is supported on crate feature
tokio-net
only.type Connection = TcpStream
type Error = Error
fn poll_accept(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Result<Self::Connection, Self::Error>>
sourceimpl AsyncAccept for UnixListener
This is supported on crate feature tokio-net
only.
impl AsyncAccept for UnixListener
This is supported on crate feature
tokio-net
only.type Connection = UnixStream
type Error = Error
fn poll_accept(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Result<Self::Connection, Self::Error>>
sourceimpl AsyncAccept for AddrIncoming
This is supported on crate features hyper-h1
or hyper-h2
only.
impl AsyncAccept for AddrIncoming
This is supported on crate features
hyper-h1
or hyper-h2
only.