Skip to main content

connect

Function connect 

Source
pub async fn connect<F>(
    io: Io<F>,
    ssl: Ssl,
) -> Result<Io<Layer<SslFilter, F>>, Error>
where F: Filter,
Expand description

Installs a TLS filter and completes a client handshake.

The caller must prepare ssl, including its peer-verification and server-name settings. Unlike SslConnector::connect, this function does not derive those settings from a host or apply crate::TlsConfig. No handshake timeout or concurrency limit is applied. Existing filters remain below TLS.

ยงErrors

Returns OpenSSL setup or negotiation errors, transport errors, or io::ErrorKind::UnexpectedEof if the peer disconnects before completion.