TsgcWebSocketServer  | Server Close Connection

A single Connection can be closed using Close or Disconnect methods.

 

Disconnect

TsgcWSConnection has a method called Disconnect(), that allows you to disconnect connection at socket level. If you call this method, socket will be disconnected directly without waiting any response from client. You can send a Close Code with this method.

 

Close

TsgcWSConnection has a method called Close(), which allows you to send a message to server requesting to close connection, if client receives this message, must close the connection and server will receive a notification that connection is closed. You can send a Close Code with this method.

 

 

DisconnectAll

Disconnects all active connections. This method is called automatically before server stops listening, but you can call this method at any time.