-
Notifications
You must be signed in to change notification settings - Fork 8
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
Adapter not supporting binary data #10
Labels
bug
Something isn't working
Comments
Hi! I could indeed reproduce with the latest |
darrachequesne
added a commit
to socketio/socket.io-parser
that referenced
this issue
Jan 19, 2023
Note: this issue has existed since Socket.IO v1.0 (see [1]), because the `deconstructPacket()` method also mutates its input argument. This also explains why some adapters (like [2]) need to use `process.nextTick()` when extending the `broadcast()` method, because `Adapter.broadcast()` calls `Encoder.encode()` ([3]). Related: - socketio/socket.io#4374 - socketio/socket.io-mongo-adapter#10 [1]: 299849b [2]: https://github.com/socketio/socket.io-postgres-adapter/blob/0.3.0/lib/index.ts#L587-L590 [3]: https://github.com/socketio/socket.io-adapter/blob/2.4.0/lib/index.ts#L148
darrachequesne
added a commit
that referenced
this issue
Jan 19, 2023
- the types are now included in the `mongodb` package - the "promoteBuffers" option now works properly - the "useUnifiedTopology" option was removed Reference: https://github.com/mongodb/node-mongodb-native/blob/main/etc/notes/CHANGES_4.0.0.md Related: - #10 - socketio/socket.io-parser@ae8dd88
OK, so I think I have found the culprit, this should be fixed by socketio/socket.io-parser@ae8dd88, included in I've also added a test here: ea20cce Thanks a lot for the clear report 👍 Please reopen if needed! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I am trying to send binary data UInt8Array the data is going from client to server properly but when the server broadcast the received data the other server in the cluster is not receiving the data it receives this.
when I see the mongodb collection also shows what I receives on the receiving client.
Also the client on the receiving end disconnects once this malformed data starts to come in
socket.io server version: 4.5.4
socket.io client version: 4.5.4
nodejs: 18.0
os: windows
mongodb: 5
The text was updated successfully, but these errors were encountered: