Disconnect the specified client session from the server.
A boolean value which specifies if the client has been signaled to disconnect from the server. A return value of true specifies that the operation was successful. If an error occurs, the method returns false and the application should check the value of the LastError property to determine the cause of the failure.
The Disconnect method terminates the active client session, releasing the socket handle other resources that were allocated for the session. It is only necessary to use this method if you want the server to explicitly terminate a client connection. Normally the client will close its connection to the server, the OnDisconnect event will fire and the server will automatically disconnect the client.
This method signals the thread that is managing the client that it should disconnect from the server, and it will begin the process of terminating the session. This is an asynchronous process and it is not guaranteed that the client will have actually disconnected from the server at the time that this method returns to the caller.
HttpServer Class | SocketTools Namespace | HttpServer.Disconnect Overload List