Skip to content
uencoder

WebSocket

WebSocket (RFC 6455) establishes a full-duplex persistent connection via an HTTP upgrade handshake, enabling server-initiated push and low-latency bidirectional communication.

Purpose

It creates a full-duplex real-time channel between browser and server for chat, gaming, and live dashboards.

Mechanism

After the HTTP Upgrade handshake switches protocols, the TCP connection becomes a bidirectional frame channel. Frames carry an opcode (text/binary/ping/pong/close) plus payload. The masking key prevents cache poisoning by intermediaries.

Use cases

  • Real-time chat and notifications
  • Online gaming
  • Live financial market data

Related tools

References