simplewebrtc / signalmaster

simple socket.io server for webrtc signaling
Other
1.31k stars 486 forks source link

socket.io 1.x support #42

Closed jezell closed 8 years ago

jezell commented 9 years ago

0.9 is really old. We use 1.x in production, would rather not introduce really out of date deps. Is there still an objection to upgrading?

xdumaine commented 9 years ago

I implemented it with 1.x within my own environment. Best to just use a fork, or implement the signalmaster functionality as a controller or module inside your existing socket.io app.

On the SimpleWebRTC side, you can just pass a connection object to your constructor that uses a socket.io 1.x connection underneath. Mine is here.

gmaliandi commented 9 years ago

Here's my implementation with 1.x: https://github.com/gmaliandi/signalmaster/tree/patch-1

I tested it for a basic use case and it worked perfect, passing a custom connection object in my client (I based it on this gist => https://gist.github.com/xdumaine/f9158f4b172116565307, where basically the only thing that changes is the getSessionid method, using this.connection.io.engine.id instead of the now unsupported this.connection.socket.sessionid).

In case anyone uses my implementation and finds any issue, please let me know :)