HTML and CSS Reference
In-Depth Information
even if, as is usually the case, all of those processes or threads spend most of their time
doing nothing. Servers such as Lighttpd and nginx share the processes between the con-
nections to allow them to handle a far larger number; these servers have risen in popularity
along with event-driven, real-time web applications.
D.6. Understanding the WebSocket protocol
The WebSocket protocol allows bare-bones networking between clients and servers with
little overhead—certainly far less overhead than the previously more common approach of
attempting to tunnel other protocols through HTTP. With WebSockets it's possible to pack-
age your data using the appropriate protocol, the eXtensible Messaging and Presence Pro-
tocol (XMPP) for chat, for example, but benefit from the strengths of HTTP, which, like
MasterCard, is accepted nearly everywhere.
D.6.1. WebSocket protocol vs. WebSocket API
The specifications for WebSockets are split into two parts. The WebSocket protocol de-
scribes what browser vendors and servers have to implement behind the scenes; it's the
protocol used at the network layer to establish and maintain socket connections and pass
data through them. The WebSocket API describes the interface that needs to be available
in the DOM so that WebSockets can be used from JavaScript.
The Internet Engineering Task Force (IETF) maintains the specification for the WebSocket
protocol. This is the same organization that manages the specifications for HTTP, TCP, and
IP.
WHATWG maintains the specification for the WebSocket API in concert with W3C, the
same as for the HTML5 specification itself.
D.6.2. The WebSocket protocol
Like parts of the HTML5 specification, the WebSocket protocol spent many months under
heavy development, but unlike HTML5, the versions that the client and server are using
need to match for everything to work.
Search WWH ::




Custom Search