1

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!!

Kris van der Mast
  • 16,343
  • 8
  • 39
  • 61
Isuru
  • 21
  • 3

3 Answers3

0

Found a reference: http://en.wikipedia.org/wiki/Web_Sockets#Server_Implementations

Izza
  • 2,389
  • 8
  • 38
  • 60
0

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.

Prisoner ZERO
  • 13,848
  • 21
  • 92
  • 137
0

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

Community
  • 1
  • 1
ipopa
  • 1,223
  • 11
  • 12