If you want to enable both HTTP/1.1 pipelining and HTTP/2 multiplexing...
curl_multi_setopt($mh, CURLMOPT_PIPELINING, 3);
curl_multi_setopt($mh, CURLMOPT_PIPELINING, CURLPIPE_HTTP1 | CURLPIPE_MULTIPLEX);
(PHP 5 >= 5.5.0, PHP 7)
curl_multi_setopt — Set an option for the cURL multi handle
Esta função não está documentada; somente a lista de argumentos está disponível.
One of the
The value to be set on
value should be an int for the
following values of the
||Pass 1 to enable or 0 to disable. Enabling pipelining on a multi handle will make it attempt to perform HTTP Pipelining as far as possible for transfers using this handle. This means that if you add a second request that can use an already existing connection, the second request will be "piped" on the same connection. As of cURL 7.43.0 you can also pass 2 to try to multiplex the new transfer over an existing HTTP/2 connection if possible. Instead of integer literals, you can also use the CURLPIPE_* constants if available.|
||Pass a number that will be used as the maximum amount of simultaneously open connections that libcurl may cache. Default is 10. When the cache is full, curl closes the oldest one in the cache to prevent the number of open connections from increasing.|
||Pass a number that specifies the chunk length threshold for pipelining in bytes.|
||Pass a number that specifies the size threshold for pipelining penalty in bytes.|
||Pass a number that specifies the maximum number of connections to a single host.|
||Pass a number that specifies the maximum number of requests in a pipeline.|
||Pass a number that specifies the maximum number of simultaneously open connections.|
TRUE em caso de sucesso ou
FALSE em caso de falha.