Reputation: 31
I am trying to create a messagewebsocket with a specific sub-protocol. In javascript this wouldn't be a problem, but in c# there is no parameter for this. The only thing I've found is how to get a list of the protocols, (https://msdn.microsoft.com/en-us/library/windows/apps/windows.networking.sockets.messagewebsocketcontrol.supportedprotocols) but there is no setter.
Upvotes: 1
Views: 850
Reputation: 31
Just had to add the name to the list:
var protocollist = messageWebSocket.Control.SupportedProtocols;
protocollist.Add("subprotocol");
Upvotes: 2