O'Reilly logo

Getting Started with HTML5 WebSocket Programming by Vangos Pterneas

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 1. WebSocket – a Handshake!

In real life, handshaking is the act of gently grasping two people's hands, followed by a brief up and down movement. If you have ever greeted someone this way, then you already understand the basic concept of the HTML5 WebSocket protocol.

WebSockets define a persistent two-way communication between web servers and web clients, meaning that both parties can exchange message data at the same time. WebSockets introduce true concurrency, they are optimized for high performance, and result in much more responsive and rich web applications.

The following diagram shows a server handshake with multiple clients:

WebSocket – a Handshake!

For the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required