WebSocketClient.State
property · WebSocketClient · cAlgo.API
DesktopCLICloud
Gets current state of WebSocketClient instance.
Environment behaviour
Cloud — works differently. Connects only to port 25345, and only on production cloud servers. Other ports fail to connect.
Definition
public WebSocketClientState State {get;}
webSocketClient.State: WebSocketClientState
Returns WebSocketClientState
Examples
var client = new WebSocketClient();
client.Connect(new Uri("wss://stream.example.com/quotes"));
Print("WebSocket state: {0}", client.State);
from System import Uri
client = WebSocketClient()
client.Connect(Uri("wss://stream.example.com/quotes"))
api.Print(f"WebSocket state: {client.State}")