3 ms·
Just wondering, why are people still using socket.io and not standard websockets, as available in every browser since several years now?
by oboopfmlrmnmn 9y ago
Just wondering, why are people still using socket.io and not standard websockets, as available in every browser since several years now?
- 11235813213455 9y agosockJS is a good solution, websocket are reliable, but it's annoying to make sure they reconnect when they close, sockJS does it in a sane way People are using socket.io because of the hype/sheep behavior and misinformation
- XCSme 9y agoIf you don't mind performance, using socket.io gives you stay-alive on the ws connection. If you don't mind writing the 5 lines of code it takes to implement stay-alive for normal websockets then socket.io makes no sense anymore.
- gbuk2013 9y agoIt provides fallback connection methods if WS connection fails, as it can do if you have, for example, a HTTP/1.0 only proxy between you and the client. For example it was not that long ago that nginx did not support proxying HTTP/1.1. It is getting less and less relevant but at least for me the socket.io code has worked for a long time and there hasn't been a need to rewrite it.
- emilsedgh 9y agoI'm personally using it because it gives me: 1. Rooms 2. Disconnects and reconnects, 3. Fallack solutions for free. Although not for a game. I trust that its just not made for that kind of performance. But for a messaging app its actually quite decent.