Trait tokio_openssl::SslConnectorExt [−][src]
pub trait SslConnectorExt { fn connect_async<S>(&self, domain: &str, stream: S) -> ConnectAsync<S>
where
S: AsyncRead + AsyncWrite; }
Extension trait for the SslConnector
type in the openssl
crate.
Required Methods
fn connect_async<S>(&self, domain: &str, stream: S) -> ConnectAsync<S> where
S: AsyncRead + AsyncWrite,
S: AsyncRead + AsyncWrite,
Connects the provided stream with this connector, assuming the provided domain.
This function will internally call SslConnector::connect
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 for clients who have already established, for example, a TCP connection to a remote server. That stream is then provided here to perform the client half of a connection to a TLS-powered server.
Implementations on Foreign Types
impl SslConnectorExt for SslConnector
[src]
impl SslConnectorExt for SslConnector
fn connect_async<S>(&self, domain: &str, stream: S) -> ConnectAsync<S> where
S: Read + Write,
[src]
fn connect_async<S>(&self, domain: &str, stream: S) -> ConnectAsync<S> where
S: Read + Write,