Skip to content
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

make interface match browser WebSocket class? #5080

Open
jkarneges opened this issue Apr 18, 2016 · 2 comments
Open

make interface match browser WebSocket class? #5080

jkarneges opened this issue Apr 18, 2016 · 2 comments
Labels
package:engine.io This concerns the "engine.io" package

Comments

@jkarneges
Copy link

The engine.io client is so close to a polyfill for the browser WebSocket class that I wonder if it shouldn't match the interface? E.g. setting callbacks with onmessage = func instead of on('message', func) and so on. This way, projects that use the WebSocket class could support the engine.io client via simple dependency injection, rather than having to be made specifically aware of engine.io.

@jkarneges
Copy link
Author

Apparently it even used to work this way:
http://www.devthought.com/2012/07/07/the-realtime-engine/

Would a patch to support the WebSocket interface be accepted?

@jkarneges
Copy link
Author

We went ahead and made a wrapper to emulate the WebSocket class. Here it is if anyone's interested: https://github.com/fanout/engine.io-as-websocket

@darrachequesne darrachequesne transferred this issue from socketio/engine.io Jul 9, 2024
@darrachequesne darrachequesne added the package:engine.io This concerns the "engine.io" package label Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:engine.io This concerns the "engine.io" package
Projects
None yet
Development

No branches or pull requests

2 participants