Answer the question
In order to leave comments, you need to log in
Is it possible to abandon socket.io in favor of ws?
What are the advantages of using socket.io today compared to pure ws?
Answer the question
In order to leave comments, you need to log in
Before socket.io was a websocket wrapper that added convenience and fallbacks.
And now... nothing has changed.
Nobody forbids you to abandon this library and write on "native" websockets.
The upside is that if the client or someone on the path doesn't support websocket, then socket.io can switch to POST and GET. A pure websocket can't do that. I had this when the nginx proxy was crookedly configured and did not support the websocket.
Minus in size, the client needs to download the socket.io library.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question