HTML and CSS Reference
Chapter 3. Configuring the Server
WebSocket stands for bidirectional, full-duplex communication. As a result, we need
two parties for this kind of conversation. In the previous chapter, we implemented the
WebSocket client application. Now it's time to establish the other side of the channel,
which is the WebSocket server.
Why do I need a WebSocket server?
We assume that you have a minor familiarity with servers in general. A server is noth-
ing but a remote computer that has specific hardware and software requirements in
order to achieve high availability and up-time, enhanced security, and management of
multiple concurrent connections.
events and actions. It usually exposes similar methods to the WebSocket client API
and most programming languages provide an implementation. The following diagram
illustrates the communication process between a WebSocket server and a WebSock-
et client, emphasizing the triggered events and actions.
The following diagram shows WebSocket server and client event triggering:
Do not get confused—a WebServer can either run on top of Apache or IIS—or it can
be a completely different application by itself.
Considering the hardware, you could use a super-computer or your developer ma-
chine as a server. It's all down to the requirements and the budget of each project.