-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
socket.io v4.6.0 js library cannot decode binary message from netty-socketio 2.0.6 #940
Comments
Maybe the same problem. |
I'm having the same problem. The array has one more bit in the header and the value is 4 |
怎么解决呢 |
看是在客户端还是在服务端解决,服务端的话encoding的位置把那个4去掉。 这里的根本问题就是binary encoding的时候开头多了个4 |
服务端的用nodejs版本去做了,走rpc到业务。 |
服务器端也是一样的问题,我的解决方法是把byte[]转换成base64字符串,然后当数据传过去,客户端接受字符串,再反一下,变成byte[],就没问题了。 服务器端: 客户端:(也是java) |
太暴力了,这个流量会增加不少 |
byte buffer in server side before call sendEvent as below:
but data received by js side have a byte (value 4) more
then I find reason is code in EncoderHandler.handleWebsocket function line 261 ( outBuf.writeByte(4); )
is there any solution to fix this problem?
The text was updated successfully, but these errors were encountered: