All skills
Databases & Realtime
Socket.IO
Latestv4.8.3Updated Mar 18, 2026
Overview
Socket.IO is an event-driven library for real-time web applications. It enables real-time, bi-directional communication between web clients and servers. It consists of two components: a client, and a server. Both components have a nearly identical API.
Read moreHow it works
js
io.on("connection", (socket) => {
socket.emit("welcome", "Hello!");
socket.on("ping", () => socket.emit("pong"));
});The flow
Step by step, from source to running.
- 1Client connects via Socket.IO
- 2Handshake picks a transport
- 3Falls back WS → HTTP polling
- 4Rooms broadcast events
Latest changes
v4.8.3 · Mar 18, 2026
- do not throw when calling io.close() on a stopped server (9581f9b)
- engine.io@~6.6.0 (no change)
- ws@~8.18.3 (no change)