-
Notifications
You must be signed in to change notification settings - Fork 569
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
Adopt a stream interface for the socket instance #73
Comments
Yes |
Hey Arnout I recall you tweeting about this last week. Has the code made it into master yet, or were you proposing an API? It would be great to have this. |
@owenb I worked on this in my stream branch: https://github.com/3rd-Eden/engine.io/tree/stream. The only that my small test reached 100% cpu and started leaking memory.. So I'm still debugging it, but it's coming. I hope that i can finish it before realtime conf starts ;p |
Great news :) I will hopefully be able to try out your branch before NodeDublin. Thanks! |
@3rd-Eden maybe have a look at https://github.com/substack/shoe for a working implementation based on sockjs which should be easy to adapt |
@juliangruber it's already working, just need to find time to add tests to it.. See https://github.com/3rd-Eden/engine.io/tree/stream |
@3rd-Eden I see it still emits 'message' instead of 'data'. So you won't be able to pipe! |
@juliangruber That is correct, because it's a writeable stream |
In your code the stream is readable...and why not make it emit message and data? |
@juliangruber would work i guess |
Hm I don't really get why you would implement only half of the stream interface, what is the win? |
You can't claim to use node.js core style if it's not a stream. |
https://github.com/Raynos/engine.io-stream Feel free to port or inline that into engine.io. Or tell people that want a stream to just use that. |
- Remove deprecated iOS 7.1 - Add Firefox and Microsoft Edge browsers - Add latest stable Node.js release
Consider implementing a stream compatible interface on top of the socket. It is already inherting from EventEmitter so making it a writeable, and readable Stream (http://nodejs.org/api/stream.html) would be a small but potentially important step as it would allow us to write pipe-able interfaces on top of engine.io.
The text was updated successfully, but these errors were encountered: