-
-
Notifications
You must be signed in to change notification settings - Fork 4
Implement enough to make this pass autobahn-testsuite #5
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
Conversation
82ae6ca
to
7680cbc
Compare
lib/protocol/websocket/connection.rb
Outdated
buffer = @frames.map(&:unpack).join | ||
buffer = @frames.map(&:unpack).join("") | ||
|
||
if @frames.first.is_a?(TextFrame) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest something more like:
buffer = @frames.first.decode(buffer)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is something I do not understand here, is there a Frame#decode
method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, I'm suggesting we introduce it. The frame class should know how to process the data.
7680cbc
to
5a0f484
Compare
cc8b6d4
to
26224ac
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've seen it run locally, looks good to me!
2b9637a
to
78e6861
Compare
This adds features and fixes enough old ones that all tests in https://github.com/crossbario/autobahn-testsuite passes, even if some of them do so non-strictly.
78e6861
to
718ab34
Compare
This adds features and fixes enough old ones that all tests in https://github.com/crossbario/autobahn-testsuite passes, even if some of them do so non-strictly by either not failing early or by simply not implementing any extensions.
Description
Previously there was a lot of edge-cases related to error handling, framing, and closing connections that was not implemented. I implemented enough new features that you can now run the autobahn-testsuite and it passes with the following echo server.
autobahn-test-results.zip
The most important changes is that the framing is fixed in text frames and control frames, we try to implement the closing handshake, and that we check for reserved bits that we don't support yet (because they have not been specified at this moment).
There is a workaround for a bug in Async::IO for 0-length reads in there, it should probably be fixed in Async::IO and then removed from here before this is merged. We should probably also add these tests to CI, but I'm going to call for the local CI-expert @olleolleolle to help with that.
Types of Changes
Testing