Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support the hybi-10 version of the WebSocket protocol #13

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

wulczer
Copy link

@wulczer wulczer commented Jul 31, 2011

These changes make txWebSocket support hybi-10, as explained in #12

My hybi-10 branch relies on my binary-frames-closing-handshake, because of the makeStatefulDispatcher usage. This pull request incorporates both of these branches, I believe.

wulczer added 14 commits May 15, 2011 21:18
Support 0xFF frames, as specified in the WebSocket protocol draft
hixie-76, section 5.3. Introduce a separate instance variable
controlling the maximum size of a 0xFF frame that the server will accept.
Specified in section 1.4 of hixie-76, the closing handshake can be
initiated by either peer. Support closing handshakes initiated by the
client, the server does not have the ability to initiate closing
handshakes himself.
This protocol version is defined in
http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-10
and is incompatible with the currently popular hixie-76 version.

Add code to handle the new handshake and data framing. Still missing
is support for fragmented frames and unit tests. There is probably a
couple of bugs hiding in there, but it was successfully tested with
Chromium 15.0.839.0, which implements hybi-10.
Commit 752241f accditentally ended up
hooking the hybi-10 protocol decoder to requests using the
pre-hixie-75 handshake.
Otherwise the frameLengthExceeded handler can be called multiple times
while decoding the length.
In passing fix a few bugs where opcodes were mismatched and frame
fragments were lost.
The decoder does not have a reference to the transport, it has to go
through the handler.
Empty frames were putting the decoder in the PAYLOAD state, from which
it was never recovering because no payload was ever received.
@rlotun
Copy link
Owner

rlotun commented Sep 6, 2011

Thanks for this! I'll take a look at it and merge it in very soon.

@jellonek
Copy link

jellonek commented Oct 9, 2012

And what is a status of this review?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants