Docs
/
Node Express
Chapter 19
19 — WebSockets & Real-Time
Core Concepts
- WebSocket — persistent bidirectional connection (unlike HTTP request/response)
- Socket.IO — WebSocket library with fallbacks, rooms, namespaces
- Events — emit and listen for named events
- Rooms — group sockets for targeted broadcasting
- Namespaces — separate concerns on a single connection
- Heartbeat — keep-alive pings to detect disconnections