Closed TheTechsTech closed 2 years ago
I do not know yet why listening does not work, though now $conn will always be available with poll.php, i.e. the fclose() error should not appear with current master.
The pipes are failing because windows just does not support named pipes like that, it needs something arcane like \\pipe\TheName
.
Since this extension using a old libuv version, the tests and examples fails cause it does not do the conversion on Windows from '0.0.0.0', but changing the IP to '127.0.0.1' directly, everything works.
The test https://github.com/amphp/ext-uv/blob/master/tests/800-uv_tty.phpt will work on Windows by changing /dev/tty
to ('\\' === DIRECTORY_SEPARATOR ? '\\\\?\\CON' : '/dev/tty')
.
The test https://github.com/amphp/ext-uv/blob/master/tests/003-uv_write_different-callbacks.phpt also works under Windows by using uv_tty_init($loop, STDOUT,0)
according to https://github.com/libuv/help/issues/120 is a know issue to use as a workaround solution.
My WIP uv-ffi uses current libuv version that has a uv_pipe()
function, so uv_pipe_open($loop, STDOUT);
has a additional emulation mode gets switch to whenever called, getting the same behavior.
The
tcp_bind.php
example waits for connect instead doing an auto client connect, i manually connect and get header dumpThe
poll.php
example accepts connect, no display in browser, and errors withThe
pipe.php
exampleThe
pipe_bind_connect.php
example