pub fn dial_named<S: Read + Write>(
config: Arc<ClientConfig>,
name: ServerName<'static>,
io: S,
) -> Result<(StreamOwned<ClientConnection, S>, PeerIdentity), PeerError>Expand description
dial sending name as the server name: the host the client dialled, for a server
verified by Roots, which check that its certificate is for that name
(a DNS name, or an IP address the certificate names). Pinned trust ignores the name.
The returned peer’s fingerprint is the server’s leaf certificate’s, however it was verified.
§Errors
PeerError::Io when the handshake fails, including a refused server certificate;
PeerError::refusal says why this side refused one.