-
-
Notifications
You must be signed in to change notification settings - Fork 63
Support half-open duplex streams #27
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
Comments
For the reference, Node.js also has a |
Just trapped into a nasty bug with old PHP version (PHP 5.5.10) If we have write-only stream (new Stream(fopen($file, 'wb), $loop)) then stream_get_contents blocks execution even in non-blocking mode. |
@nick4fake This sounds like a separate issue (which could possibly be related to #46). Can you file a separate ticket and provide some details / a gist so I can look into this? Thanks! |
I still think that this feature makes perfect sense 👍 However, there are currently no immediate plans to build this from my end (no demand at the moment and more important outstanding issues currently), but I suppose we would be really happy to accept PRs 👍 |
React PHP has support for both bidirectional duplex streams and unidirectional half-duplex streams.
close
once it can no longer be read.close
once it can no longer be written to.close
s once if can either no longer be read or no longer be written to.We should add an option to allow bidirectional duplex streams to be half-open. In this mode the readable and writable state would be checked independently.
This is particularly useful for some TCP/IP-based protocols where the client sends a FIN message to the server indicating that it will no longer write any data but is still willing to accept incoming data.
The text was updated successfully, but these errors were encountered: