By default, TsgcWebSocketClient does not use any SubProtocol. WebSocket sub-protocols are built on top of the WebSocket protocol and define a custom message protocol. Examples of WebSocket sub-protocols include MQTT, STOMP, etc.
The WebSocket SubProtocol name is sent as an HTTP Header in the WebSocket HandShake. This header is processed by the server, and if the server supports this subprotocol, it will accept the connection. If it is not supported, the connection will be closed automatically.
Example: connect to a websocket server with SubProtocol name 'myprotocol'
Client := TsgcWebSocketClient.Create(nil);
Client.Host := 'server host';
Client.Port := server.port;
Client.RegisterProtocol('myprotocol');
Client.Active := True;