Function trust_dns_proto::rustls::tls_client_stream::tls_client_connect
source · pub fn tls_client_connect<S: Connect>(
name_server: SocketAddr,
dns_name: String,
client_config: Arc<ClientConfig>
) -> (Pin<Box<dyn Future<Output = Result<TlsClientStream<S>, ProtoError>> + Send + Unpin>>, BufDnsStreamHandle)
Available on crate feature
dns-over-rustls
only.Expand description
Creates a new TlsStream to the specified name_server
Arguments
name_server
- IP and Port for the remote DNS resolverbind_addr
- IP and port to connect fromdns_name
- The DNS name, Subject Public Key Info (SPKI) name, as associated to a certificate