If the method succeeds, the return value is the socket handle for
the active client session. If the method fails, the return value is
INVALID_SOCKET. To get extended error information, call the
GetLastError method.
The GetActiveClient method returns a handle to the client
socket for the active client session. The active session is determined
by the session thread that is currently executing, and therefore is
only meaningful within the context of a server event handler such as
OnConnect or OnRead. The value returned by the his
method is the same as the client socket handle that is passed to the
event handler.
This method will fail within an OnAccept event handler
because at that point the connection has not yet been accepted,
therefore there is no active client session. It will also fail if
called outside of an event handler. To obtain the socket handle
associated with a particular session thread, use the
GetThreadClient method.