Packet Sniffer SDK DLL Edition Events :: OnSessionClose Previous Next
Fires immediately after stopping tracking a session by
HNTcpManager object.
Syntax: void __stdcall OnSessionClose(DWORD_PTR Param, HANDLE hTcpSession, BOOL *pbNeed); Parameters: Param [in] OnSessionClose event handler parameter. May be set by the
TcpMgrSetOnClose function call. hTcpSession pbNeed [in,out] Flag that prevents HNTcpSession
object deleting. If it is set in TRUE while OnSessionClose event handler works, the
HNTcpManager component will not delete
HNTcpSession object, and then
OnSessionDelete (see HNFN_TCPDELETE ) event handler will not be executed.
To delete HNTcpSession object
later, you should call
TcpMgrDeleteSession
function manually. The default value of this flag is FALSE. This parameter value is ignored
while TcpMgrResetSessions ,
TcpMgrResetOnTimeOut , and
TcpMgrDeleteSession functions
executing. Description: Set this event handler to make necessary actions at the moment of stopping
tracking a session by HNTcpManager object.
This event handler is called in the context of a thread, which has called the
following functions:
TcpMgrProcessPacket ,
TcpMgrResetSessions ,
TcpMgrResetOnTimeOut ,
TcpMgrCloseSession ,
TcpMgrDeleteSession .
Use HNTcpSession.CloseReason [Get ]
property to get the reason of the session closing.
See also: HNTcpManager ,
TcpMgrSetOnClose ,
HNTcpSession ,
TcpMgrProcessPacket ,
TcpMgrResetSessions ,
TcpMgrResetOnTimeOut ,
TcpMgrDeleteSession ,
TcpSesGetCloseReason ,
HNFN_TCPDELETE