-
Notifications
You must be signed in to change notification settings - Fork 353
Description
Hi!
I would like to ask if there are any plans on updating SocketIO toolchain to rely on the global WebSocket
class that has been available in Node.js since 2023. Presently, SocketIO hard-codes the 'websocket'
transport to use ws
in Node.js. I would like to have an API that would allow me to use the global WebSocket
class instead, similar to how it works in the browser.
Given that SocketIO already works with the browser's WebSocket
, and the Node.js (Undici's) implementation of the protocol is faithful, I suppose that supporting this will not require any significant changes to the library. On the other hand, it would help unblock apps and test setups that would benefit greatly from reusing the same global APIs (which is a huge reason the ecosystem shares more and more of them with every passing year).
Thanks!