Struct aggligator_util::transport::tls::TlsClient
source · pub struct TlsClient { /* private fields */ }Available on crate feature
tls only.Expand description
TLS outgoing connection wrapper.
Pass this to Connector::wrapped to apply TLS
encryption to each outgoing link.
Implementations§
source§impl TlsClient
impl TlsClient
sourcepub fn new(client_cfg: Arc<ClientConfig>, server_name: ServerName) -> Self
pub fn new(client_cfg: Arc<ClientConfig>, server_name: ServerName) -> Self
Creates a new TLS outgoing connection wrapper.
The identity of the server is verified using TLS against server_name.
The outgoing link is encrypted using TLS with the configuration specified
in client_cfg.