Duplex stream
ralt opened this issue · comments
Florian Margaine commented
Hi,
Is it possible to have a duplex stream? A typical use case is sharing a stream and having one side reading from it, while the other is writing to it. Quite similar to Golang's channels.
Niklas Keller commented
Yes, you can just implement both interfaces. That's what Socket
does in amphp/socket
.
Do you want a class that collects all writes and spits those out to the reader again?
Niklas Keller commented
I'm going to close this for now. We don't see a need for a combined interface currently.