RFC 6455 — The WebSocket Protocol by node
The WebSocket Protocol enables two-way communication between a client running untrusted code in a controlled environment and a remote host that has opted into communications from that code. The protocol consists of an opening handshake followed by basic message framing, layered over TCP. The goal is to provide a mechanism for browser-based applications that need two-way communication with servers without relying on multiple HTTP connections.