calzoneman / sync

Node.JS Server and JavaScript/HTML Client for synchronizing online media
Other
1.45k stars 235 forks source link

SocketIO is significantly out of date #899

Closed Xaekai closed 3 years ago

Xaekai commented 3 years ago

Version 3 is out, and it brings a new wildcard event emitter which would be super handy for simplifying the bot.

calzoneman commented 3 years ago

It warrants investigation whether socket.io 3.0 is backwards compatible for existing clients or not. If it's a breaking change, I'd be tempted to just go ahead and migrate to plain uWebSockets.js instead.

calzoneman commented 3 years ago

socket.io 3 uses engine.io 4 which is a breaking protocol change, so this will definitely break existing socket.io clients.

calzoneman commented 3 years ago

Apparently socket.io 4 is already out now. I need to check if it has any backwards compatibility for 2.x clients.

Xaekai commented 3 years ago

I was surprised you didn't bump it up to 2.4.1 in the meantime when you did that recent dependency bump.

It does look like there is some sort of compat flag https://socket.io/docs/v3/server-initialization/#allowEIO3

calzoneman commented 3 years ago

I was surprised you didn't bump it up to 2.4.1 in the meantime when you did that recent dependency bump.

That was because they made breaking changes to the server initialization that I didn't feel like fixing at the time.