TLSClient.this

Set up a new TLS client session

class TLSClient
public
this
(
void delegate
(
in ubyte[]
)
socket_output_fn
,
void delegate
(
in ubyte[]
)
proc_cb
,
void delegate
(
in TLSAlert
,
in ubyte[]
)
alert_cb
,
bool delegate handshake_cb
,,,,,,,
Vector!string next_protocols = Vector!string()
,
size_t reserved_io_buffer_size = 16 * 1024
)

Parameters

socket_output_fn void delegate
(
in ubyte[]
)

is called with data for the outbound socket

proc_cb void delegate
(
in ubyte[]
)

is called when new application data is received

alert_cb void delegate
(
in TLSAlert
,
in ubyte[]
)

is called when a TLS alert is received

handshake_cb bool delegate

is called when a handshake is completed

session_manager TLSSessionManager

manages session state

creds TLSCredentialsManager

manages application/user credentials

policy TLSPolicy

specifies other connection policy information

rng RandomNumberGenerator

a random number generator

server_info TLSServerInformation

is identifying information about the TLS server

offer_version TLSProtocolVersion

specifies which version we will offer to the TLS server.

next_protocols Vector!string

specifies protocols to advertise with ALPN

reserved_io_buffer_size size_t

This many bytes of memory will be preallocated for the read and write buffers. Smaller values just mean reallocations and copies are more likely.

Meta