workerman的pipe是否不支持回调

Hanmo
$worker->onConnect=function($conn)use($targetAddr){
    echo 'connected1';
    $conn->remote=new AsyncTcpConnection($targetAddr);
    $conn->remote->onClose=function($conn){
        echo 1;
    };
    $conn->remote->pipe($conn);
    $conn->pipe($conn->remote);
    $conn->remote->connect();
    echo 'connected2';
};

...

$worker->onClose=function($conn){
    echo 1;
};

无论是在 第五行 还是第16行的均没有输出
是否是pipe不支持回调

且在第三行有输出 但是第10行无输出,是否是出现了bug(阻塞)?

1793 1 0
1个回答

walkor

pipe不支持回调。

  • 暂无评论
年代过于久远,无法发表回答
🔝