casual-simulation / casualos

Casual Open Simulation for the Web
https://ab1.bot
MIT License
49 stars 9 forks source link

Replace socket.io with a native WebSocket implementation #243

Closed KallynGowdy closed 2 years ago

KallynGowdy commented 2 years ago

Socket.io worked great for the start of this project, but now it is time to move on. We were stuck on v2.1.1 for a while due to an issue where WebSocket messages were getting dropped somehow.

In the end, there is little to no reason to prefer using Socket.io (and therefore Engine.io) when native WebSockets work perfectly fine. The apiary implementation has been using native WebSockets for well over a year with few to no issues so it makes sense to take the opportunity to reduce our dependency surface area and cut our bundle size by a bit.