Packet Sniffer SDK DLL Edition

HNTcpManager :: Methods :: TcpMgrResetOnTimeOut

 Previous Next

Deletes obsolete HNTcpSession objects.

Syntax:

void __stdcall TcpMgrResetOnTimeOut(HANDLE hTcpMgr, DWORD TimeOut);

Parameters:

hTcpMgr

[in] HNTcpManager object handle.

TimeOut

[in] TCP session time-out, in milliseconds.

Description:

Use TcpMgrResetOnTimeOut to delete TCP sessions with exceeded time-out. TcpMgrResetOnTimeOut makes this decision using the GetTickCount() Win32 API function and LastPacketTime property as follows:

IF GetTickCount() - LastPacketTime >= TimeOut THEN TcpMgrResetOnTimeOut.

If HNTcpManager contains packets awaiting to be assembled, the event handlers OnPacketReturn will be called for each packet belonging to the session to be deleted and awaiting for assembling in the HNTcpManager object.

Also event handlers OnSessionClose and OnSessionDelete will be called one after another for this session.

See also:HNTcpManager, HNTcpSession.LastPacketTime, OnPacketReturn, OnSessionClose, OnSessionDelete