State of WebSocket polyfill

I started trying to integrate authbahn.js (client library for WebSocket subprotocol called WAMP) and first thing I stumbled on is lack of support for WebSocket.protocol property that this client lib is relying on.

It’s clearly marked as TODO in so I wonder how battle-tested this polyfill might be?

As far as I understand, WebSocket.protocol and WebSocket.extensions are effectively required to use things like WAMP or, meaning that none of these client libs can be used without adapting for missing properties.

Since it doesn’t look like this polyfill is actively maintained, what is the best way to hack on fuselibs-public?

That file is just the JS layer, and the underlying OS-specific implementation lives here.

I imagine extending the polyfill shouldn’t be too hard if the Objective-C and Java libraries support what you need (and it seems they do).

That said, I’ve seen fuse-example-using-socketio working just fine before, so maybe that particular implementation didn’t rely on protocol being present.

Looks like this early version of client lib didn’t cared at all about protocol, so it could work.

I modified autobahn-js library to enforce same protocol on every connection, and so far it looks like it’s working as expected - I’ll post my findings later.

If I have more time to spend on that, I also might try and dig into fuselibs - it’s all interesting stuff!