coroutineGetAllGroups

TCP/WebSocket可以使用。

协程的方式获取有多少客户端在线。

在集群模式下同样可以使用。

协程例子:

    public function getAllGroups()
    {
        $value = yield get_instance()->coroutineGetAllGroups();
        var_dump($value);
        $this->destroy();
    }

results matching ""

    No results matching ""