gimite / web-socket-js

HTML5 Web Socket implementation powered by Flash
BSD 3-Clause "New" or "Revised" License
2.73k stars 489 forks source link

Support hybi-10 protocol #82

Closed gimite closed 13 years ago

gimite commented 13 years ago

It seems Chrome dev channel supports hybi-10 protocol: http://blog.chromium.org/2011/08/new-websocket-protocol-secure-and.html

So we need to apply diff from hybi-07 to hybi-10 to the hybi-07 branch. My plan is to implement it when we switch the main branch to hybi-07. But if someone send me pull request to do that, I'm happy to pull it.

imanel commented 13 years ago

Should we switch main branch to hybi-07 when all browsers are moving to hybi-10? I'm not sure which browsers are supporting -07, but there are echoes that -10 is close to final and probably that one should be main branch when switch will occur.

kanaka commented 13 years ago

Chrome-14 has it. Firefox 7 has it but it is prefixed "MozWebSocket". So far that's all I know of.

IMO, I think the right time to switch is when Chrome 14 goes stable with it.

Also, it seems like this might be very useful: http://www.tavendo.de/autobahn/testsuite.html

It's a WebSocket test suite (and only applies to the HyBi protocol). It's a bit of a pain to get the suite going, but having results for web-socket-js results on this page http://www.tavendo.de/autobahn/testsuite/report/ seems like it would be a major plus. To test web-socket-js we might have to disable a few of the really long running tests.

kanaka commented 13 years ago

There shouldn't be too much work to move from HyBi-07 to HyBi-10. The basics of the protocol didn't change much. Actually, HyBi-09 and HyBi-10 were just textual updates to the HyBi-08 specification and so in fact all three (8, 9, and 10) report version 8 in the handshake.

The bigger change will be to support binary data in the API which is currently being worked on by Chrome but not released anywhere yet. Our hybi-07 branch doesn't have support for that yet. The new API also has new close events. http://dev.w3.org/html5/websockets/

I may or may not have time in the next few weeks to implement binary support in the API. But it will probably be at least a few months before any stable browser release has binary support so it's not super urgent.

gimite commented 13 years ago

IMO, I think the right time to switch is when Chrome 14 goes stable with it.

I agree.

I may or may not have time in the next few weeks to implement binary support in the API. But it will probably be at least a few months before any stable browser release has binary support so it's not super urgent.

Yeah, let's support "hybi-10 without binary protocol" first, because that's probably what Chrome stable will support first. After that, we can implement binary protocol.

Also, it seems like this might be very useful: http://www.tavendo.de/autobahn/testsuite.html

It's a WebSocket test suite (and only applies to the HyBi protocol). It's a bit of a pain to get the suite going, but having results for web-socket-js results on this page http://www.tavendo.de/autobahn/testsuite/report/ seems like it would be a major plus. To test web-socket-js we might have to disable a few of the really long running tests.

Thanks for the information. This looks useful. Let's run it after we implement hybi-10.

gimite commented 13 years ago

Done.