ConnectionRequest
Description
Event that signals a connection has been established.
Remarks
This event fires when another host requests a connection with the local host application. The application receiving this event must have already called the AddListener method. The SocketHandle parameter indicates the new socket's handle, if it is accepted. The Accept parameter is set to True by default, but can be changed to False to reject the connection request. Note that as little processing as possible should be done in this event since a connection can not begin to accept data until after this event has fired (for security purposes).
The ability to reject a connection is not a substitute for a firewall. Any application(s) that runs on the internet should operate behind a firewall for protection. While the application can block any initial attempts, numerous subsequent attempts should be caught and blocked by the firewall.
Note that you must use the RegisterMsgSinkConnRequest function to register your ConnectionRequest function prototype in order to receive this event.
Prototype
VOID CSockQ::OnConnectionEstablished(SOCKET SocketHandle, LONG EventID)
Last updated