What protocol enables full-duplex communication over a single TCP connection?

The story behind the answer

The WebSocket protocol enables full-duplex communication over a single TCP connection. After an initial HTTP-compatible handshake, the connection is upgraded and remains open so both the client and server can send messages independently at any time.

This design is useful for real-time applications such as chat, multiplayer games, collaborative editors, dashboards, and live notifications. Unlike ordinary request-and-response HTTP, WebSocket does not require the client to repeatedly ask whether new data is available. It also avoids much of the repeated header and connection overhead associated with polling.

WebSocket is not the same as WebRTC, which is designed primarily for peer-to-peer audio, video, and data exchange. Server-Sent Events provide a persistent server-to-client stream but are not full-duplex. WebSocket connections commonly use port 80 with the “ws” scheme or port 443 with encrypted “wss.” The protocol was standardized by the IETF in RFC 6455 in 2011.

Source: Wikipedia · fact-checked Sept. 2026

Add question to a list

Choose a list to keep this question in: