Skip to content

Am I taking crazy pills? How to yield streaming response from http / browser class interface instead of echo? #591

Answered by clue
gidzr asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @gidzr, welcome to @reactphp! This sounds like a wild ride, so let me try to clear things up a bit:

I'm not sure what you're trying to achieve exactly and without having a better understanding of the motivation, it sounds like you want to turn a ReadableStreaminterface into a Generator. This is very much possible, but does require some work because you'd have to take the thing into account that is so obvious we often forget about it: time.

ReactPHP is all about event-driven programming, so your program flow would be controlled by events happening as time passes by and consequently allows you to run any concurrent routines asynchronously. In your case, it sounds like you want to have m…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@gidzr
Comment options

Answer selected by gidzr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants