WebSocketClientOptions.SubProtocols
property · WebSocketClientOptions · cAlgo.API
DesktopCLICloud
Gets or sets sub-protocols to be negotiated during the WebSocket connection handshake.
Definition
public IEnumerable<string> SubProtocols {get; set;}
webSocketClientOptions.SubProtocols: Iterable[str]
Returns IEnumerable<string>
Examples
var options = new WebSocketClientOptions { SubProtocols = new[] { "json", "v2.quotes" } };
var client = new WebSocketClient(options);
client.Connect(new Uri("wss://stream.example.com/quotes"));
from System import Uri, Array, String
options = WebSocketClientOptions()
options.SubProtocols = Array[String](["json", "v2.quotes"])
client = WebSocketClient(options)
client.Connect(Uri("wss://stream.example.com/quotes"))