methodTsmStreamSecII.TLSClose
function TLSClose(const SessionID: TSessionID; Response: TStream; ErrorCode: PInteger = nil): Integer; overload;
Cleanly close the session identified by SessionID: emits a close_notify into Response (if given) and releases the session. Use on either side to shut a TLS connection down at the protocol level before closing the socket.
function TLSClose(UserData: Pointer; Response: TStream; ErrorCode: PInteger = nil): Integer; overload;
Cleanly close the session tagged with UserData (close_notify into Response, then release). This is the UserData-keyed counterpart to the SessionID TLSClose, matching the TLSAccept/TLSDecodeData(UserData,...) routing.