node.ws.js
node.ws.js copied to clipboard
Code incompatible with Chrome 14
Chrome 14 now uses the protocol version introduced in draft-ietf-hybi-thewebsocketprotocol-08
See http://groups.google.com/a/chromium.org/group/chromium-discuss/browse_thread/thread/97f3cb623c581395
http://twitter.com/#!/_alanshaw/status/115914253654966273
Yeah, just figured that out too.
Thanks for the heads up, would love to merge a pull request :)
I'm not familiar enough with the protocol to figure out the differences, but I found a commit for another WebSocket library which might provide a good start:
https://github.com/Ragnis/node-websocket-server/commit/974424fb32650efce0b26eab167f48f0982f2d25
sorry - didn't mean to close this!
I'm happy to look into this. I'll have something ready soon.
That's great because I'm a bit overworked recently ;)
Any progress on this yet guys?
Sorry, got about half way through and then got busy with other things. Back on it tonight.
When my chrome update to 14, it not work, I search the web and find that the latest websocket draft is version 10, chrome12 use draft7.5,7.6, and chrome14 use draft10. Can you help to support the websocket10 draft.
The official RFC for WebSocket protocol is there: http://www.ietf.org/mail-archive/web/ietf-announce/current/msg09663.html
Reimplemented this version supporting the latest protocol, also fixed some problems that the other solutions pointed above has. Also I think it might be faster since it doesn't read byte by byte
unfortunately I only tested draft10 and above I'll post it in a moment
I have nothing against your patch being non-backwards compatible. I would even encourage it - the resulting code will be just simpler :)
well It's not really a patch, I made major changes... I got some of the code from this branch, some from the https://github.com/Ragnis/node-websocket-server/commit/974424fb32650efce0b26eab167f48f0982f2d25 posted above and since it was not working for me, sometimes I would get some garbled messages I went out to find the possibles sources for the problem, read the specs, and produced something.
I'm still not happy about it, because it doesn't support some nice features like sending/receiving binary, but for now it works for me. You can find it on my projects.