vibe.d beta banner
get vibe.d
0.7.31

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 underlying,
  TLSContext ctx,
  string peer_name = null,
  NetworkAddress peer_address = NetworkAddress(sockaddr(cast(ushort)0u, [cast(byte)0, cast(byte)0, cast(byte)0, cast(byte)0, cast(byte)0, cast(byte)0, cast(byte)0, cast(byte)0, cast(byte)0, cast(byte)0, cast(byte)0, cast(byte)0, cast(byte)0, cast(byte)0]), , , )
);

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 underlying,
  TLSContext ctx,
  TLSStreamState state,
  string peer_name = null,
  NetworkAddress peer_address = NetworkAddress(sockaddr(cast(ushort)0u, [cast(byte)0, cast(byte)0, cast(byte)0, cast(byte)0, cast(byte)0, cast(byte)0, cast(byte)0, cast(byte)0, cast(byte)0, cast(byte)0, cast(byte)0, cast(byte)0, cast(byte)0, cast(byte)0]), , , )
);

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 RejectedSoftware e.K.

License

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