Open Totodore opened 10 months ago
Hi! Thanks for the pull request :+1:
I think it could also be fixed with a buffer, something like this: https://github.com/socketio/socket.io-protocol/commit/49fe300a835d2f90cbc2c058c9ad4cc501c12f43
What do you think?
Your solution also work, it has the advantage that it is also working on the browser whereas mine only works for node.js (because it uses the official stream implementation).
This issue also need to be fixed on the engine.io test-suite (I already prepared all the patches with my solution). But if you prefer to do your's, no problem.
This PR fix issue #32. The proposed solution is to extend the
ws
WebSocket instance to add an async iterator working with the utility functioncreateWebSocketStream
coming from thews
library.It has a minimal impact on the test suite codebase.