The WebSocket Protocol

Ian Fette

2011 · 345 citations · 2 references

Concepts

TL;DR

The WebSocket Protocol allows two‑way communication between a client running untrusted code in a controlled environment and an opted‑in remote host, using the browser’s origin‑based security model. The protocol aims to give browser‑based applications a lightweight two‑way communication channel with servers without opening multiple HTTP connections. It establishes a persistent connection via an opening handshake and basic message framing over TCP, enabling continuous two‑way data exchange. This protocol is a standards‑track specification.

Abstract

The WebSocket Protocol enables two-way communication between a client running untrusted code in a controlled environment to a remote host that has opted-in to communications from that code. The security model used for this is the origin-based security model commonly used by web browsers. The protocol consists of an opening handshake followed by basic message framing, layered over TCP. The goal of this technology is to provide a mechanism for browser-based applications that need two-way communication with servers that does not rely on opening multiple HTTP connections (e.g., using XMLHttpRequest or s and long polling). [STANDARDS-TRACK]

References

2