Skip to main content

2. Conformance Requirements

All diagrams, examples, and notes in this specification are non-normative, as is everything else except what is explicitly marked as normative.

2.1 Terminology and Other Conventions

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

RFC 2119 Keywords

KeywordMeaning
MUSTAbsolute requirement
MUST NOTAbsolute prohibition
REQUIREDAbsolute requirement
SHALLMandatory requirement
SHALL NOTMandatory prohibition
SHOULDStrong recommendation
SHOULD NOTStrong non-recommendation
RECOMMENDEDRecommended practice
MAYAllowed/Optional
OPTIONALCompletely optional

Key Term Definitions

WebSocket Connection
A conceptual channel established between a client and a server for transmitting WebSocket messages.

WebSocket Endpoint
Either end of a WebSocket connection (client or server).

WebSocket Client
An application that initiates a WebSocket connection.

WebSocket Server
An application that accepts a WebSocket connection.

Message
An application-level unit of data composed of one or more frames.

Frame
The smallest unit of communication in a WebSocket connection.

Control Frame
A frame used for communication state, such as Close, Ping, Pong.

Data Frame
A frame containing application or extension data.

Protocol Requirements Overview

Implementations conforming to this specification:

  1. MUST implement the complete handshake mechanism
  2. MUST correctly handle all defined frame types
  3. MUST mask all frames sent to the server in client implementations
  4. MUST NOT mask frames sent to the client in server implementations
  5. MUST close the connection when receiving non-conforming frames
  6. SHOULD support TLS (wss://)