pub(crate) fn upgrade_tcp_to_tls(
        host: &str,
        socket: TcpStream,
    ) -> impl Future<Item = TlsStream<TcpStream>, Error = NatsError> {
        let tls_connector = NativeTlsConnector::builder().build().unwrap();
        let tls_stream: TlsConnector = tls_connector.into();
        debug!(target: "nitox", "Connecting to {} through TLS over TCP", host);
        tls_stream.connect(&host, socket).from_err()
    }
/// Upgrades an existing TCP socket to TLS over TCP
Upgrades an existing TCP socket to TLS over TCP
Upgrades an existing TCP socket to TLS over TCP
pub(crate) fn upgrade_tcp_to_tls(
        host: &str,
        socket: TcpStream,
    ) -> impl Future<Item = TlsStream<TcpStream>, Error = NatsError> {
        let tls_connector = NativeTlsConnector::builder().build().unwrap();
        let tls_stream: TlsConnector = tls_connector.into();
        debug!(target: "nitox", "Connecting to {} through TLS over TCP", host);
        tls_stream.connect(&host, socket).from_err()
    }
pub ( crate ) fn upgrade_tcp_to_tls ( host : & str , socket : TcpStream , ) -> impl Future < Item = TlsStream < TcpStream > , Error = NatsError > { let tls_connector = NativeTlsConnector :: builder ( ) . build ( ) . unwrap ( ) ; let tls_stream : TlsConnector = tls_connector . into ( ) ; debug ! ( target " " " " host ) ; tls_stream . connect ( & host , socket ) . from_err ( ) }
Upgrades an existing TCP socket to TLS over TCP
Upgrades an existing TCP socket to TLS over TCP
host
&str
socket
TcpStream
host
&str
socket
TcpStream