TsgcWebSocketClientProperties › Active

Active Property

Opens or closes the WebSocket connection to the configured server.

Syntax

public bool Active { get; set; }

Default Value

False

Remarks

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.

Example


oClient = new TsgcWebSocketClient();
oClient.URL = "wss://www.esegece.com:2053";
oClient.Active = true;

Back to Properties