-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Feature Request: stdin.on('data') event #11319
Comments
I think streaming stdin has been filed, search this issue tracker. Also, for your purpose, you can just use WebSocket or WebServer module. Check out some projects using PhantomJS, e.g. Poltergeist, various screen capture, etc. |
Duplicate of #10980, for the most part. |
Thanks for the quick response. I searched the issue tracker many times w/ diff keywords, I ran into #10980, but there it talks about a non-blocking interface. I am looking for a way to hook into events to know when something is pushed into stdin buffer. Maybe I misunderstood #10980, but those are two diff things to me. @ariya's suggestion about websocket/webserver is along the right lines, but was wondering if one exists for stdin. Webserver seemed a bit heavyweight, but I will give that a try. Thanks again! |
After executing the same thing on linux, response time was reduced to ~400-500ms from previously ~1100ms. After using the webserver method, it reduced it further to ~140ms! Thank you |
Can we reopen this? Not sure why it was closed ? webserver fits a few use cases, but phantomjs should definitely include a stdin onData event. |
I wish to use phantom as part of a service through node. It seems as though spawning a new phantom process takes nearly an entire second in itself.
I wish to keep one or more long running phantom processes, and feed data through stdin. Upon receipt of the data, phantom would process and spit with stdout.
Same request found here: http://stackoverflow.com/questions/16038342/event-listener-for-phantomjs-stdin
Is there a way to do this now? Perhaps simply polling stdin?
The text was updated successfully, but these errors were encountered: