-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
Binary events sent to handlers have a 0x4 byte prepended to the binary data (v4 server) #277
Comments
This issue happens only when the client connects using the WebSocket transport. The HTTP polling transport is fine. |
After tracing through the Java socket.io client, I do see that the binary packet encoder prepends a byte for the packet type, which is So that seems to be what's happening here. I guess the current EIO version doesn't have that packet type byte at the front of the WS frame, but EIO v3 does? And socketioxide doesn't appear to differentiate? |
In v3 of the engine.io protocol, the packet type byte is prepended to the binary data that is sent out on a websocket binary frame. This byte needs to be stripped off the data before it's sent to the handler. Closes Totodore#277.
In v3 of the engine.io protocol, the packet type byte is prepended to the binary data that is sent out on a websocket binary frame. This byte needs to be stripped off the data before it's sent to the handler. Closes Totodore#277.
In v3 of the engine.io protocol, the packet type byte is prepended to the binary data that is sent out on a websocket binary frame. This byte needs to be stripped off the data before it's sent to the handler. Closes Totodore#277.
In v3 of the engine.io protocol, the packet type byte is prepended to the binary data that is sent out on a websocket binary frame. This byte needs to be stripped off the data before it's sent to the handler. Closes #277.
Describe the bug
When socketioxide is acting as a v4 server, and a client sends a binary event, the
Vec<u8>
that is exposed to the handler has a0x4
byte prepended to the otherwise-correct data.To Reproduce
See https://github.com/kelnos/socketioxide-binary-test for a reproducer; README contains instructions for running it.
Expected behavior
Binary data should appear in the socketioxide handler as it was sent by the client, not with an extra
0x4
byte in front of the data.Versions (please complete the following information):
Additional context
There are no issues when socketioxide is acting as a v5 server.
The text was updated successfully, but these errors were encountered: