ConnectionEstablished
Description
Event that signals a connection has been established.
Remarks
This event signifies that a connection has been established, and it's behaviour and parameter information varies according to whether asynchronus mode connect was used.
If the event is being used with a synchronous connect (see the ConnectSock method), then the EventID parameter will always be zero and the ConnectSock method will return the socket handle for the connection (or -1 for an error, and the LastSockErr property should be called to determine the specific error). If the asynchronus method was used to connect, then the ConnectSock method will return zero, and the EventID parameter will contain the paramter that was supplied when the ConnectSock method was called, and the SocketHandle parmeter will contain the new socket handle. If there is an error, the SocketHandle parameter will be -1, and the LastSockErr property should be called to determin why the error ocurred.
Note that you must use the RegisterMsgSinkConnEstablished function to register your ConnectionEstablished function prototype in order to receive this event.
Prototype
VOID CSockQ::OnConnectionEstablished(SOCKET SocketHandle, LONG EventID)
Last updated