methodTsmCustomTLSInternalServer.FindTLSSession
function FindTLSSession(const SessionID: TSessionID; var Client: TCustomTLS_ContentLayer): Integer; overload;
Looks up a live TLS session/content layer by its TSessionID (the id used by the TLSConnect/TLSAccept/TLSEncodeData/TLSDecodeData overloads that key sessions by SessionID rather than by an application-owned UserData pointer). Returns the session's index, or a negative value if not found.
function FindTLSSession(UserData: Pointer; var Client: TCustomTLS_ContentLayer): Integer; overload;
Looks up a live TLS session/content layer by the UserData pointer the application supplied when the session was created (e.g. via TLSConnect, TLSAccept or TLSAddClientSession/TLSAddServerSession); this is the usual way an application recovers "its" TCustomTLS_ContentLayer for a given socket/connection object. Returns the session's index, or a negative value if not found.