forked from php/doc-zh
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e54c86b
commit 33dc84f
Showing
4 changed files
with
158 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- EN-Revision: 141b05e576781405f9077abbe89e7a8b2a5eb946 Maintainer: mowangjuanzi Status: ready --> | ||
<variablelist xml:id="constant.curl-multi-setopt.constants" role="constant_list"> | ||
<title><function>curl_multi_setopt</function></title> | ||
<varlistentry xml:id="constant.curlmopt-chunk-length-penalty-size"> | ||
<term> | ||
<constant>CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE</constant> | ||
(<type>int</type>) | ||
</term> | ||
<listitem> | ||
<simpara> | ||
指定用于管道处理的块长度阈值(以字节为单位)。自 PHP 7.0.7 和 cURL 7.30.0 起可用 | ||
</simpara> | ||
</listitem> | ||
</varlistentry> | ||
<varlistentry xml:id="constant.curlmopt-content-length-penalty-size"> | ||
<term> | ||
<constant>CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE</constant> | ||
(<type>int</type>) | ||
</term> | ||
<listitem> | ||
<simpara> | ||
指定用于管道惩罚(pipelining penalty)的长度阈值(以字节为单位)。自 PHP 7.0.7 和 cURL 7.30.0 起可用 | ||
</simpara> | ||
</listitem> | ||
</varlistentry> | ||
<varlistentry xml:id="constant.curlmopt-maxconnects"> | ||
<term> | ||
<constant>CURLMOPT_MAXCONNECTS</constant> | ||
(<type>int</type>) | ||
</term> | ||
<listitem> | ||
<simpara> | ||
指定 libcurl 可以缓存的最大同时打开的连接数。默认情况下,这个大小会自动扩展到通过 <function>curl_multi_add_handle</function> | ||
添加的句柄数的四倍。当缓存已满时,cURL 会关闭缓存中最旧的一个连接,以防止打开的连接数继续增加。自 cURL 7.16.3 起可用 | ||
</simpara> | ||
</listitem> | ||
</varlistentry> | ||
<varlistentry xml:id="constant.curlmopt-max-concurrent-streams"> | ||
<term> | ||
<constant>CURLMOPT_MAX_CONCURRENT_STREAMS</constant> | ||
(<type>int</type>) | ||
</term> | ||
<listitem> | ||
<simpara> | ||
指定 cURL 在使用 HTTP/2 连接中应支持的最大并发流数量。有效值范围是从 <literal>1</literal> 到 | ||
<literal>2147483647</literal>(<literal>2^31 - 1</literal>)。这里设置的值将根据其他系统资源属性来确定是否执行。默认值是 | ||
<literal>100</literal>。自 PHP 8.2.0 和 cURL 7.67.0 起可用。 | ||
</simpara> | ||
</listitem> | ||
</varlistentry> | ||
<varlistentry xml:id="constant.curlmopt-max-host-connections"> | ||
<term> | ||
<constant>CURLMOPT_MAX_HOST_CONNECTIONS</constant> | ||
(<type>int</type>) | ||
</term> | ||
<listitem> | ||
<simpara> | ||
指定单个主机的最大连接数。自 PHP 7.0.7 和 cURL 7.30.0 起可用 | ||
</simpara> | ||
</listitem> | ||
</varlistentry> | ||
<varlistentry xml:id="constant.curlmopt-max-pipeline-length"> | ||
<term> | ||
<constant>CURLMOPT_MAX_PIPELINE_LENGTH</constant> | ||
(<type>int</type>) | ||
</term> | ||
<listitem> | ||
<simpara> | ||
指定管道中的最大请求数。自 PHP 7.0.7 和 cURL 7.30.0 起可用 | ||
</simpara> | ||
</listitem> | ||
</varlistentry> | ||
<varlistentry xml:id="constant.curlmopt-max-total-connections"> | ||
<term> | ||
<constant>CURLMOPT_MAX_TOTAL_CONNECTIONS</constant> | ||
(<type>int</type>) | ||
</term> | ||
<listitem> | ||
<simpara> | ||
指定同时打开的最大连接数。自 PHP 7.0.7 和 cURL 7.30.0 起可用 | ||
</simpara> | ||
</listitem> | ||
</varlistentry> | ||
<varlistentry xml:id="constant.curlmopt-pipelining"> | ||
<term> | ||
<constant>CURLMOPT_PIPELINING</constant> | ||
(<type>int</type>) | ||
</term> | ||
<listitem> | ||
<simpara> | ||
传递 1 启用或传递 0 禁用。在多句柄上启用管道将使其尝试对使用此句柄的传输尽可能执行 HTTP | ||
管道操作。这意味着如果添加的第二个请求可以使用已有连接,则第二个请求将在同一连接上使用“管道”。自 | ||
cURL 7.43.0 起,该值是位掩码,传递 2 将尝试在现有的 HTTP/2 连接上多路复用新传输。传递 | ||
3 指示 cURL 请求彼此独立的管道和多路复用。自 cURL 7.62.0 起,设置管道 bit 没有效果。除了整数文字,还可以使用 | ||
CURLPIPE_* 常量。自 cURL 7.16.0 起可用。 | ||
</simpara> | ||
</listitem> | ||
</varlistentry> | ||
<varlistentry xml:id="constant.curlmopt-pushfunction"> | ||
<term> | ||
<constant>CURLMOPT_PUSHFUNCTION</constant> | ||
(<type>int</type>) | ||
</term> | ||
<listitem> | ||
<para> | ||
传递 <type>callable</type> 以注册处理服务器推送且应具有以下签名: | ||
<methodsynopsis> | ||
<type>int</type><methodname><replaceable>pushfunction</replaceable></methodname> | ||
<methodparam><type>resource</type><parameter>parent_ch</parameter></methodparam> | ||
<methodparam><type>resource</type><parameter>pushed_ch</parameter></methodparam> | ||
<methodparam><type>array</type><parameter>headers</parameter></methodparam> | ||
</methodsynopsis> | ||
<variablelist role="function_parameters"> | ||
<varlistentry> | ||
<term><parameter>parent_ch</parameter></term> | ||
<listitem> | ||
<simpara> | ||
父级 cURL 句柄(客户端发出的请求)。 | ||
</simpara> | ||
</listitem> | ||
</varlistentry> | ||
<varlistentry> | ||
<term><parameter>pushed_ch</parameter></term> | ||
<listitem> | ||
<simpara> | ||
推送请求的新 cURL 句柄。 | ||
</simpara> | ||
</listitem> | ||
</varlistentry> | ||
<varlistentry> | ||
<term><parameter>headers</parameter></term> | ||
<listitem> | ||
<simpara> | ||
推送 promise header。 | ||
</simpara> | ||
</listitem> | ||
</varlistentry> | ||
</variablelist> | ||
推送函数如果可以处理推送应该返回 <constant>CURL_PUSH_OK</constant>,或者返回 | ||
<constant>CURL_PUSH_DENY</constant> 拒绝。自 PHP 7.1.0 和 cURL 7.44.0 起可用。 | ||
</para> | ||
</listitem> | ||
</varlistentry> | ||
</variablelist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters