If the method succeeds, the return value is the number of client
session threads that have been created by the server. If the method
fails, the return value is INET_ERROR. To get extended error
information, call the GetLastError method.
The InetGetClientThreads function returns the number of
threads that are managing client sessions for the specified server. If
there are no clients connected to the server, this function will
return a value of zero. Because this function returns the number of
session threads, the value returned will include those clients that
are in the process of disconnecting from the server but their session
thread has not yet terminated. This differs from the
InetEnumServerClients function which will only enumerate active
clients.
If you wish to determine when the last client has disconnected from
the server, call this function within an event handler for the
INET_EVENT_DISCONNECT event. If the function returns a value greater
than one, then there are other client sessions that are either
connected or in the process of terminating.