We are happy to announce the release of Socket.IO v3!
This release contains a few non backward compatible changes.
We have published a dedicated migration guide with all necessary details.
That’s an excellent question actually. Depending on your use case, it might make sense to use plain WebSocket directly:
What Socket.IO brings:
- a fallback to HTTP long-polling, in case the WebSocket connection cannot be established
To be honest, this feature was awesome 10 years ago, when most browsers didn’t support WebSocket, but this is not the case anymore. That’s still a great safety net though.
Using plain WebSocket, you can take a look at robust-websocket.
- a classic request-response API: acknowledgements
// on one side
- a way to broadcast data to a given set of clients: Rooms
Which also works when scaling to several Socket.IO servers (more information here).
- a way to split your application logic into distinct modules (for more complex applications): Namespaces
an ecosystem of compatible clients in other languages
- Java: https://github.com/socketio/socket.io-client-java
- C++: https://github.com/socketio/socket.io-client-cpp
- Swift: https://github.com/socketio/socket.io-client-swift
- Dart: https://github.com/rikulo/socket.io-client-dart
- Python: https://github.com/miguelgrinberg/python-socketio
- .Net: https://github.com/Quobject/SocketIoClientDotNet
the Redis adapter (used when broadcasting across Socket.IO servers) will be updated in order to be compatible with Socket.IO v3 (update: done!)
the client implementations in other languages will be updated as well
a big focus on the documentation (additional code examples, extended guide, …)
additional tooling around Socket.IO
The project is now part of the beta of Github Discussions. Depending on the feedback of the community, it might replace the Slack channel in the future.
If you have any question about the release, let’s discuss here.