Packet Sniffer SDK DLL Edition

HNTcpManager :: Events :: TcpMgrSetOnConnect

 Previous Next

Sets the address and the parameter value for the OnSessionConnect event handler (see HNFN_TCPCONNECT).

Syntax:

FARPROC __stdcall TcpMgrSetOnConnect(HANDLE hTcpMgr, FARPROC pfOnConnect, DWORD_PTR Param);

Parameters:

hTcpMgr

[in] HNTcpManager object handle.

pfOnConnect

[in] Event handler function address. This function must be declared as HNFN_TCPCONNECT.

Param

[in] Event handler parameter. This parameter is sent to the event handler each time it is called.

Return values:

If the function succeeds the return value will be the value of the pfOnConnect parameter.

Description:

Use TcpMgrSetOnConnect to set the address and the parameter value for the OnSessionConnect event handler. OnSessionConnect event handler is executed in the context of a thread, which has called TcpMgrProcessPacket function.

See also:HNTcpManager, HNFN_TCPCONNECT, TcpMgrProcessPacket