symplely/coroutine

View on GitHub
examples/uv/pipe.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

$pipe = uv_tty_init(uv_default_loop(), \STDOUT, 0);
//$pipe = uv_pipe_init(uv_default_loop(), 0);
//uv_pipe_open($pipe, 1);
//uv_pipe_bind($pipe,"/tmp/hoge.sock");

uv_write($pipe, "Hello", function ($pipe, $buf) {
    echo 1;
    uv_close($pipe);
});

uv_run();