<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                # swoole_server->getClientList 用來遍歷當前`Server`所有的客戶端連接,`Server::getClientList`方法是基于共享內存的,不存在`IOWait`,遍歷的速度很快。另外`getClientList`會返回所有`TCP`連接,而不僅僅是當前`Worker`進程的`TCP`連接。 > 推薦使用 [swoole_server::$connections](https://wiki.swoole.com/wiki/page/427.html) 迭代器來遍歷連接 > `getClientList`的別名是`connection_list` > `getClientList`僅可用于`TCP`客戶端,`UDP`服務器需要自行保存客戶端信息 > `SWOOLE_BASE`模式下只能獲取當前進程的連接 函數原型: ```php swoole_server::getClientList(int $start_fd = 0, int $pagesize = 10); ``` 此函數接受`2`個參數,第`1`個參數是起始`fd`,第`2`個參數是每頁取多少條,最大不得超過`100`。 * 調用成功將返回一個數字索引數組,元素是取到的`$fd`。數組會按從小到大排序。最后一個`$fd`作為新的`start_fd`再次嘗試獲取 * 調用失敗返回`false` 示例: ```php $start_fd = 0; while(true) { $conn_list = $serv->getClientList($start_fd, 10); if ($conn_list===false or count($conn_list) === 0) { echo "finish\n"; break; } $start_fd = end($conn_list); var_dump($conn_list); foreach($conn_list as $fd) { $serv->send($fd, "broadcast"); } } ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看