RE: [PHP-DEV] Re: .phpt test question
On Thu, Sep 5, 2013 at 5:38 AM, Daniel Lowrey <[email protected]> wrote:
> On further consideration this is probably better addressed by setting the
> relevant socket streams to non-blocking so that a client connection can be
> created in the same process space and tested utilizing select() and an
> event loop. This would obviate the need for a proc_open() altogether.
^^ this. This is how most of the tests in the sockets extension work when
they need to test a remote connection.
Example:
https://github.com/php/php-src/blob/master/ext/sockets/tests/socket_sentto_r
ecvfrom_ipv4_udp.phpt
Thread (3 messages)