diff --git a/p.php b/p.php index 6fd199e6..c7c4499c 100644 --- a/p.php +++ b/p.php @@ -1 +1,25 @@ addProcess(new Swoole\Process(function (\Swoole\Process $server) use ($client) { + while (true) { + echo json_encode($client->stats(), JSON_UNESCAPED_UNICODE) . PHP_EOL; + sleep(1); + } +})); +$client->on('open', function (Server $server) { + +}); + +$client->on('message', function (Server $server, $frame) { + +}); + +$client->on('close', function (Server $server, $fd) { + +}); +$client->start(); \ No newline at end of file