开发者

Handshaking in HTML 5

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


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


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


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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜