HTML and CSS Reference
Table 3-4. ( continued )
When to Use this Code
Message Too Large
Send this code when receiving a message that
is too large for your application to handle.
(Remember, frames can have payload lengths
up to 64 bits long. Even if you have a big server,
some messages are still too large.)
Send this code from the client (browser) when
your application requires one or more specific
extensions that the server did not negotiate.
Send this code when your application cannot
continue handling the connection for an
TLS Failure (reserved)
Do not send this code. The WebSocket API uses
this code to indicate when TLS has failed before
the WebSocket handshake.
■ Chapter 2 describes how the WebSocket API uses the close codes. For additional
information about the WebSocket API, see http://www.w3.org/TR/websockets/ .
Other code ranges are reserved for specific purposes. Table 3-5 lists the four
categories of close codes defined in RFC 6455.