-
Notifications
You must be signed in to change notification settings - Fork 10
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
Fix tests 4.1.3, 4.1.4, 4.2.1, 4.2.2, 4.2.3, 4.2.4 and way to process data in woketo #28
Conversation
// return ''; | ||
// } | ||
// | ||
// return $data; |
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.
no code in comments please
|
||
public function __construct($maxLength, $message = 'The frame is too big to be processed.') |
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.
no type ?
@@ -8,6 +8,7 @@ | |||
* on the root directory of this project | |||
*/ | |||
|
|||
declare(strict_types=1); |
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.
why ? no good for performance ...
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.
Because sometimes it's really important. (and it is for some parts of woketo)
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 understand but it is in a central class, so it should be interesting a load tests for the impact. But ok
This commit modify the way of processing binary entry frames. Old way: taking binary frame as websocket frame (and bufferize if it was not complete). New way: it take a binary frame as one or many frames composing one or many messages and bufferize if frames are not complete. This new behavior makes autobahn execute new tests that was crashing woketo. The fix is taking 4 bytes for the mask (sometimes it was less because of a wrong usage of the BitManipulation class). Switch to usage of generators
3d0c334
to
8dc874d
Compare
Please notice that the new way of processing data is not great in term of maintainability. This is an echo to #23 .
This PR should close #27
Please notice it also fixes some tests in 9.x.