<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>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                # 異步Http2.0客戶端 Swoole-1.9.7增加了對`Http2.0`客戶端的支持。新增的客戶端類名為`Swoole\Http2\Client`,繼承自`Swoole\Client`,實現了`Http2.0`客戶端協議的完整支持。 Http2.0客戶端與Http1.1的最大差別是2.0支持了Stream并發機制,可以同時發起多個`GET`或`POST`請求。最大并發數量受限與服務器端規定的`max_concurrent_streams`設置。 編譯安裝 ---- 需要依賴`nghttp2`庫,編譯Swoole擴展時需要設置`--enable-http2`、`--enable-openssl`或`--with-openssl-dir`。 使用示例 ----- ```php $array = array( "host" => "www.jd.com", "accept-encoding" => "gzip, deflate", 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'accept-language' => 'zh-CN,zh;q=0.8,en;q=0.6,zh-TW;q=0.4,ja;q=0.2', 'user-agent' => 'Mozilla/5.0 (X11; Linux x86_64) Chrome/58.0.3026.3 Safari/537.36', ); $client = new Swoole\Http2\Client("www.jd.com", 443, true); $client->setHeaders($array); $client->setCookies(array("a" => "1", "b" => "2")); $client->get("/", function ($o) use($client) { echo "#{$client->sock} hello world 1\n"; echo $o->body; }); $client->post("/", $array, function ($o) use($client) { echo "{$client->sock} hello world 3\n"; echo $o->body; $client->close(); }); Swoole\Event::wait(); ```
                  <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>

                              哎呀哎呀视频在线观看