WebSocket
Full-duplex communication channel between browser and server. Establish a connection once, both sides can send data anytime — no need to re-initiate requests each time.
Module Contents
- Overview — What is WebSocket, how it differs from HTTP
- Core Concepts — URL format, subprotocols, heartbeat mechanism
- Basic Usage — Connect, send, receive, close
- Advanced Usage — Reconnect, disconnect detection, binary data, subprotocols
- Practical: Real-time Chat — Build a multi-user real-time chat app from scratch