Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

methodTsmCustomTLSInternalServer.TLSConnect

function TLSConnect(UserData: Pointer; Response: TStream; ErrorCode: PInteger = nil): Integer; overload;
Client-side: starts the client handshake for the UserData-keyed session, writing the ClientHello to Response; the server's replies go through TLSDecodeData. If no session exists yet for UserData, one is created automatically (see TLSAddClientSession). 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. This is the usual entry point for a plain socket-based TLS client loop.
function TLSConnect(const SessionID: TSessionID; Response: TStream; ErrorCode: PInteger = nil): Integer; overload;
Client-side: same as the UserData-keyed TLSConnect, but for a session already identified by SessionID rather than a UserData pointer.
function TLSConnect(UserData: Pointer; const SessionID: TSessionID; Response: TStream; ErrorCode: PInteger = nil): Integer; overload;
Client-side: TLSConnect variant that lets an application supply both a UserData pointer and an explicit SessionID for the same session (e.g. when resuming a specific prior session against a socket object).
function TLSConnect(UserData: Pointer; const SessionID: TSessionID; const CipherSuites: TCipherSuites; Response: TStream; ErrorCode: PInteger): Integer; overload;
Client-side: as the other TLSConnect(UserData, SessionID, ...) overload, but additionally restricts/orders the cipher suites offered for this one connection to CipherSuites, overriding Options.CipherSuites for just this handshake.