Packet Sniffer SDK DLL Edition

Events :: OnDisconnect

 Previous Next

Fires when TCP session is closed.

Syntax:

void __stdcall OnDisconnect(DWORD_PTR Param, DWORD_PTR ThParam, HANDLE hLBSession, DWORD Direction);

Parameters:

Param

[in] OnDisconnect event handler parameter. May be set by the LbAdpSetOnDisconnect function call.

ThParam

[in] User defined thread parameter (see HNFN_THREADBEGIN).

hLBSession

[in] HNLBSession object handle.

Direction

[in] Data transmission direction (values are defined by HNLBDirection enumeration).

Description:

Use this event handler to make necessary actions at the moment of TCP connection closing. OnConnect event handler is called by HNLBAdapter component when an application closes connection to a remote server, or a remote server closes connection to application.

See also:HNLBAdapter, LbAdpSetOnDisconnect, HNFN_THREADBEGIN, HNLBSession, HNLBDirection