@new


Description:

public static TlsClientConnection? @new (IOStream base_io_stream, SocketConnectable? server_identity) throws Error

Creates a new TlsClientConnection wrapping base_io_stream ( which must have pollable input and output streams) which is assumed to communicate with the server identified by server_identity.

See the documentation for base_io_stream for restrictions on when application code can run operations on the base_io_stream after this function has returned.

Parameters:

base_io_stream

the IOStream to wrap

server_identity

the expected identity of the server

Returns:

the new TlsClientConnection, or null on error