methodTsmStreamSecII.TLSConnect
function TLSConnect(UserData: Pointer; Response: TStream; ErrorCode: PInteger = nil): Integer; overload;
Client entry point: start a TLS handshake for the connection tagged UserData, writing the ClientHello into Response. Creates the client session on first call. Feed the server's replies back via TLSDecodeData(UserData,...). A second call on the same session follows TCustomTLS_ContentLayer.Connect: -1 and nothing written once the session ended. TLSClose(UserData) a failed session before reusing its UserData.
function TLSConnect(const SessionID: TSessionID; Response: TStream; ErrorCode: PInteger = nil): Integer; overload;
Client handshake keyed on a SessionID instead of a UserData pointer. Supply a previously issued SessionID to attempt (TLS 1.2) session resumption / abbreviated handshake.
function TLSConnect(UserData: Pointer; const SessionID: TSessionID; Response: TStream; ErrorCode: PInteger = nil): Integer; overload;
Client handshake that both tags the session with UserData and offers the given SessionID for resumption - use when you route bytes by UserData but also want to resume a specific prior session.
function TLSConnect(UserData: Pointer; const SessionID: TSessionID; const CipherSuites: TCipherSuites; Response: TStream; ErrorCode: PInteger): Integer; overload;
As above, but also overrides the cipher-suite preference list for just this one client session (instead of inheriting TLSOptions.CipherSuites) - useful when a particular endpoint needs a restricted or specific suite set.