vibe.d beta banner
get vibe.d
0.10.0

Asynchronous I/O that doesn’t get in your way, written in D

createTLSStream - multiple declarations

Function createTLSStream

Constructs a new TLS tunnel and infers the stream state from the TLSContextKind.

TLSStream createTLSStream(Stream) (
  Stream underlying,
  TLSContext ctx,
  string peer_name = null,
  NetworkAddress peer_address = NetworkAddress.init
)
if (isStream!Stream);

Depending on the TLSContextKind of ctx, the tunnel will try to establish an TLS tunnel by either passively accepting or by actively connecting.

Parameters

NameDescription
underlying The base stream which is used for the TLS tunnel
ctx TLS context used for initiating the tunnel
peer_name DNS name of the remote peer, used for certificate validation
peer_address IP address of the remote peer, used for certificate validation

Function createTLSStream

Constructs a new TLS tunnel, allowing to override the stream state.

TLSStream createTLSStream(Stream) (
  Stream underlying,
  TLSContext ctx,
  TLSStreamState state,
  string peer_name = null,
  NetworkAddress peer_address = NetworkAddress.init
)
if (isStream!Stream);

This constructor allows to specify a custom tunnel state, which can be useful when a tunnel has already been established by other means.

Parameters

NameDescription
underlying The base stream which is used for the TLS tunnel
ctx TLS context used for initiating the tunnel
state The manually specified tunnel state
peer_name DNS name of the remote peer, used for certificate validation
peer_address IP address of the remote peer, used for certificate validation
Authors

Sönke Ludwig

Copyright

© 2012-2014 Sönke Ludwig

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.