Cannot connect using WebSockets, not changing readyState

前端 未结 1 749
半阙折子戏
半阙折子戏 2021-01-21 08:43

Ive tried several approaches and even copy/pasted from http://code.google.com/p/phpwebsocket/

Im using Google Chrome 5.0.375.70 beta and the error is always the same: E

相关标签:
1条回答
  • 2021-01-21 09:13

    There are currently 2 supported Drafts of the WebSocket API in the wild.

    Draft75 which is the one that is supported by the linked PHP script, and Draft76 which requires a different Upgrade Header and Handshake, another one Draft77 is also finished and may suddenly and up being implement by a Browser.

    Somewhere between Version 5 and 6 of Chrome they did the switch from Draft75 to Draft76.

    As far as I can see here, the PHP Script does not terminate the connection when it receives an invalid upgrade header. Therefore Chrome will still wait for the Handshake, which explains while the ReadyState does not change.

    0 讨论(0)
提交回复
热议问题