Trait tokio_openssl::SslAcceptorExt [−][src]
pub trait SslAcceptorExt { fn accept_async<S>(&self, stream: S) -> AcceptAsync<S>
where
S: AsyncRead + AsyncWrite; }
Extension trait for the SslAcceptor
type in the openssl
crate.
Required Methods
fn accept_async<S>(&self, stream: S) -> AcceptAsync<S> where
S: AsyncRead + AsyncWrite,
S: AsyncRead + AsyncWrite,
Accepts a new client connection with the provided stream.
This function will internally call SslAcceptor::accept
to connect
the stream and returns a future representing the resolution of the
connection operation. The returned future will resolve to either
SslStream<S>
or Error
depending if it's successful or not.
This is typically used after a new socket has been accepted from a
TcpListener
. That socket is then passed to this function to perform
the server half of accepting a client connection.
Implementations on Foreign Types
impl SslAcceptorExt for SslAcceptor
[src]
impl SslAcceptorExt for SslAcceptor
fn accept_async<S>(&self, stream: S) -> AcceptAsync<S> where
S: Read + Write,
[src]
fn accept_async<S>(&self, stream: S) -> AcceptAsync<S> where
S: Read + Write,