Skip to main content

dial_named

Function dial_named 

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

dial sending name as the server name, as crate::dial_named does.

ยงErrors

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