Handshaking in HTML 5

1.7k Views Asked by At

In Websockets, which is an exciting new concept of HTML 5, there is a specific feature - Handshaking between the WebSockets server and Client. Can anyone explain what this is used for??

Thank You!!

3

There are 3 best solutions below

0
On

The handshake process is used in establishing and validating a connection. The purpose of the handshake is to prove the server has read the client's handshake. This is accomplished through the use of 2 fields: Sec-WebSocket-Key1 and Sec-WebSocket-Key2. The Sec-WebSocket-Key1 and Sec-WebSocket-Key2 fields are 8-byte random tokens which the server (then) uses to construct a 16-byte token at the end of its handshake...this then is used to prove the server has read the client's handshake.

0
On

you can read more about the websockets protocol including the handshake here: https://datatracker.ietf.org/doc/html/draft-ietf-hybi-thewebsocketprotocol-06

0
On