Constructs a new TLS tunnel and infers the stream state from the TLSContextKind.
Depending on the TLSContextKind of ctx, the tunnel will try to establish an TLS tunnel by either passively accepting or by actively connecting.
The base stream which is used for the TLS tunnel
TLS context used for initiating the tunnel
DNS name of the remote peer, used for certificate validation
IP address of the remote peer, used for certificate validation
See Implementation
Constructs a new TLS tunnel and infers the stream state from the TLSContextKind.
Depending on the TLSContextKind of ctx, the tunnel will try to establish an TLS tunnel by either passively accepting or by actively connecting.