I'm working on a legacy project that requires the subprotocol to be explicitly declared. This is possible in both the browser's WebSocket class, as well as C#'s System.Net.WebSockets system.
This pull request adds optional constructors that allow passing a string or a list of strings with subprotocols defined.
The browser implementation passes the subprotocols as the second argument to new WebSocket()
The System.Net.WebSockets implementation adds the protocols via the ClientWebSocket.Options.AddSubProtocol() method
I'm working on a legacy project that requires the subprotocol to be explicitly declared. This is possible in both the browser's
WebSocket
class, as well as C#'sSystem.Net.WebSockets
system. This pull request adds optional constructors that allow passing a string or a list of strings with subprotocols defined.The browser implementation passes the subprotocols as the second argument to
new WebSocket()
The System.Net.WebSockets implementation adds the protocols via the
ClientWebSocket.Options.AddSubProtocol()
methodThis is the same as #29, but on the #upm branch