WebSocket
Also called: WebSockets, WS, WSS
WebSocket provides a persistent channel for text or binary messages in both directions between a client and a server. After an opening handshake, either peer can send messages without waiting for a new request. Its framing preserves message boundaries, unlike a raw TCP byte stream.
A collaborative editor can send a keystroke update and receive another person’s edit on the same connection. The original HTTP/1.1 handshake uses an Upgrade request and a 101 response; other HTTP versions have their own bootstrapping rules. Secure WebSockets use TLS. Reconnection, authorization and application acknowledgments still need an application design.
- Read first
- HTTP
- Further reading
- IETF RFC 6455 — The WebSocket Protocol