WebSocketClientOptions.KeepAliveInterval
property · WebSocketClientOptions · cAlgo.API
DesktopCLICloud
Gets or sets the WebSocket protocol keep-alive interval. Default value is set to 30 seconds.
Definition
public TimeSpan KeepAliveInterval {get; set;}
webSocketClientOptions.KeepAliveInterval: TimeSpan
Returns TimeSpan
Examples
var options = new WebSocketClientOptions { KeepAliveInterval = TimeSpan.FromSeconds(5) };
var client = new WebSocketClient(options);
client.Connect(new Uri("wss://stream.example.com/quotes"));
from System import Uri, TimeSpan
options = WebSocketClientOptions()
options.KeepAliveInterval = TimeSpan.FromSeconds(5)
client = WebSocketClient(options)
client.Connect(Uri("wss://stream.example.com/quotes"))