Once the connection has been terminated, the client socket
handle is no longer valid and should no longer be used. Note that it
is possible that the actual handle value may be re-used at a later
point when a new connection is established. An application should
always consider the socket handle to be opaque and never depend on it
being a specific value.
This method sends an internal control message that notifies the
server that this session should be terminated. When the session thread
is signaled that it should terminate, it will begin to release the
resources allocated for that session. To ensure that the client session
terminates gracefully, there may be a brief period of time where the
session thread is still active after this method has returned.
The Disconnect method should only be used to terminate
client sessions and the server handle should never be provided as the
hSocket parameter. To stop the server, use the Stop
method.