TsgcWebSocketClient › Properties › Active
Opens or closes the WebSocket connection to the configured server.
property Active: Boolean read GetActive write SetActive default False;
False
Set Active to True to start a new WebSocket connection using the current Host, Port, TLS and URL settings. Setting the property back to False closes the connection gracefully. Use Active (rather than the low-level Connected method) to check whether the client has an open session; Active is safer because it does not invoke Indy's internal connected routine, which can lock the thread.
oClient := TsgcWebSocketClient.Create(nil);
oClient.URL := 'wss://www.esegece.com:2053';
oClient.Active := true;