Skip to main content

dial

Function dial 

Source
pub async fn dial<S>(
    config: Arc<ClientConfig>,
    io: S,
) -> Result<(TlsStream<S>, PeerIdentity), PeerError>
where S: AsyncRead + AsyncWrite + Unpin,
Expand description

Dials a peer over io, completing the handshake before returning. The server name sent is SERVER_NAME; dial_named sends another.

ยงErrors

PeerError::Io when the handshake fails, including a refused peer certificate; PeerError::refusal says why this side refused one.