wamp.rt icon indicating copy to clipboard operation
wamp.rt copied to clipboard

Fix non-working Router options.handleProtocols and options.disableProtocolCheck

Open kenklin opened this issue 5 years ago • 0 comments

The Router constructor's options.handleProtocols handling seems like it is meant to either ...

  1. use the caller's options.handleProtocols, if supplied, or
  2. use the its default implementation accepting only the "wamp.2.json" subprotocol, or
  3. not supply handleProtocols at all to WebSocket.Server if options.disableProtocolCheck is 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

kenklin avatar Jul 19 '20 17:07 kenklin