wamp.rt
wamp.rt copied to clipboard
Fix non-working Router options.handleProtocols and options.disableProtocolCheck
The Router constructor's options.handleProtocols handling seems like it is meant to either ...
- use the caller's
options.handleProtocols, if supplied, or - use the its default implementation accepting only the
"wamp.2.json"subprotocol, or - not supply
handleProtocolsat all to WebSocket.Server ifoptions.disableProtocolCheckis true.
None of these seem to currently work. This can be seen by running node examples/basic and Autobahn's client at https://github.com/crossbario/autobahn-js code testing basic.js.
In wamp.rt, handleProtocol signature's second argument is a cb callback function which does not match WebSocket.Server options's handleProtocol's request causing problems. Perhaps this was left over from some other non-ws early web socket implementation that is non-compatible?
A fix will appear in https://github.com/kenklin/wamp.rt