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

Adopt a stream interface for the socket instance #73

Closed
3rd-Eden opened this issue Sep 2, 2012 · 14 comments
Closed

Adopt a stream interface for the socket instance #73

3rd-Eden opened this issue Sep 2, 2012 · 14 comments

Comments

@3rd-Eden
Copy link
Contributor

3rd-Eden commented Sep 2, 2012

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.

@rauchg
Copy link
Contributor

rauchg commented Sep 2, 2012

Yes

@owenb
Copy link

owenb commented Oct 9, 2012

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.

@3rd-Eden
Copy link
Contributor Author

3rd-Eden commented Oct 9, 2012

@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

@owenb
Copy link

owenb commented Oct 10, 2012

Great news :) I will hopefully be able to try out your branch before NodeDublin. Thanks!

@juliangruber
Copy link

@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

@3rd-Eden
Copy link
Contributor Author

3rd-Eden commented Nov 7, 2012

@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

@juliangruber
Copy link

@juliangruber
Copy link

@3rd-Eden I see it still emits 'message' instead of 'data'. So you won't be able to pipe!

@3rd-Eden
Copy link
Contributor Author

@juliangruber That is correct, because it's a writeable stream

@juliangruber
Copy link

In your code the stream is readable...and why not make it emit message and data?

@3rd-Eden
Copy link
Contributor Author

@juliangruber would work i guess

@juliangruber
Copy link

Hm I don't really get why you would implement only half of the stream interface, what is the win?

@Raynos
Copy link
Contributor

Raynos commented Dec 3, 2012

100% Node.JS core style

You can't claim to use node.js core style if it's not a stream.

@Raynos
Copy link
Contributor

Raynos commented Dec 7, 2012

image

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.

@rauchg rauchg closed this as completed May 31, 2013
darrachequesne added a commit that referenced this issue May 8, 2020
- Remove deprecated iOS 7.1
- Add Firefox and Microsoft Edge browsers
- Add latest stable Node.js release
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants