@NiklasI think a single interface would be possible if using stream socket resources (as the AMPHP example shows). Most implementations that I've seen actually wrap I/O streams in a class and this would require a more descriptive specification and introduces a couple of other considerations.
I'd like to reword my statement to say that I think standardisation in general would help. My intention to start a discussion on what we'd like the PSR to achieve rather than suggest implementation details - apologies!
--
You received this message because you are subscribed to the Google Groups "PHP Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to php-fig+u...@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/a125991a-63ab-49a4-b63c-53281bc49ebb%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/CAPY1sU_bdOeXm7xhBbdLQ7DWQ7pskK3maWdmc0Ygkb%2BFhWdDzQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/CANUQDCg_i0mKEQdXBOH7bxpP%2B4G7ncTQ4p7fec4vk4KDnkPNDg%40mail.gmail.com.
I think another stream interface is not a great idea.
I've tried to open discussion on a stream PSR in a new thread: https://groups.google.com/forum/#!topic/php-fig/LGYQ5x9L9-k
Yes but from what I can see, and correct me if I'm wrong here, they don't tie directly into the event loop the way resources, timers, and deferred execution do. Which brings me to the questions what do we want in this PSR, is that just an event loop interface or do we want to include more like coroutines, streams interfaces, timer interface(s)?
It might be unwise to use the __toString() method in an async environment but I don't think that it wouldn't work as such.
Wouldn't it be a better idea to improve the proposal so that it makes clear blocking and non blocking methods and is more suable in an async environment?
Even if the decision is to separate the two interfaces they would likely be contained in the same proposal.Would you see one as an extension of the other or both as completely separate?
--
You received this message because you are subscribed to the Google Groups "PHP Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to php-fig+u...@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/5b9ff364-5396-4a21-ad85-9b4687807da0%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/CAPY1sU8SJmT7eRttJaiuumbqvuKrFwTxL_vNx%2B1icF1_GJz%2BhA%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "PHP Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to php-fig+u...@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/6b5f148c-befc-439d-8b5c-064c5f3e303a%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/68939981-3aea-47ab-bbb7-03d69f494d89%40googlegroups.com.