An application must register this callback function by passing its
address to the InetRegisterEvent function. The
InetEventProc function is a placeholder for the
application-defined function name.
If the callback function is being used with the
InetServerStart function, the function will be called in the
context of the thread that is currently managing the server or client
session. You must ensure that any access to global or static
variables is synchronized, otherwise the results may be
unpredictable. It is recommended that you do not declare any static
variables within the callback function itself. If you need to manage
state information for a specific client, then use the
InetGetClientData and InetSetClientData functions which
will allow you to access application defined data for that client
session in a thread-safe manner.
When this callback function is used for event notifications from
the server interface, the hSocket parameter specifies the
client socket handle, except for the INET_EVENT_ACCEPT event, in
which case the handle references the server socket handle. To obtain
the handle of the client connection that was just accepted, use the
InetGetServerClient function. To obtain the handle to the
server using the client socket handle, use the
InetGetClientServer function.