Web Sockets: reateWebSocket factory method is missing an argument for setting the protocol
The createWebSocket factory method is missing an argument for setting the protocol. See: The new WebSocket(url, protocols) constructor steps are: .... all of the other websocket apis out there allow this protocol field. Typically, a server will implement a call like request.accept('echo-protocol') or something like 'sec-websocket-protocol'. Real browsers send their request origin along. This limitation in the current design may actually crash servers on connection if the server hasn't set it self up to have some defensive design. I have test cases where my spectacles can crash the server because it passes no protocols.
1
vote