# curl_multi_setopt

`CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE` (`int`)

- Specifies the chunk length threshold for pipelining in bytes. Available as of PHP 7.0.7 and cURL 7.30.0

`CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE` (`int`)

- Specifies the size threshold for pipelining penalty in bytes. Available as of PHP 7.0.7 and cURL 7.30.0

`CURLMOPT_MAXCONNECTS` (`int`)

- Specifies the maximum amount of simultaneously open connections that libcurl may cache. By default the size will be enlarged to fit four times the number of handles added via `curl_multi_add_handle`. When the cache is full, curl closes the oldest one in the cache to prevent the number of open connections from increasing. Available as of cURL 7.16.3.

`CURLMOPT_MAX_CONCURRENT_STREAMS` (`int`)

- Specifies the maximum number of concurrent streams for connections that cURL should support on connections using HTTP/2. Valid values range from `1` to `2147483647` (`2^31 - 1`). The value passed here would be honored based on other system resources properties. Default is `100`. Available as of PHP 8.2.0 and cURL 7.67.0.

`CURLMOPT_MAX_HOST_CONNECTIONS` (`int`)

- Specifies the maximum number of connections to a single host. Available as of PHP 7.0.7 and cURL 7.30.0

`CURLMOPT_MAX_PIPELINE_LENGTH` (`int`)

- Specifies the maximum number of requests in a pipeline. Available as of PHP 7.0.7 and cURL 7.30.0

`CURLMOPT_MAX_TOTAL_CONNECTIONS` (`int`)

- Specifies the maximum number of simultaneously open connections. Available as of PHP 7.0.7 and cURL 7.30.0

`CURLMOPT_PIPELINING` (`int`)

- 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 adding a second request that can use an already existing connection will "pipe" the second request on the same connection. As of cURL 7.43.0, the value is a bitmask, and passing 2 will try to multiplex the new transfer over an existing HTTP/2 connection. Passing 3 instructs cURL to ask for pipelining and multiplexing independently of each other. As of cURL 7.62.0, setting the pipelining bit has no effect. Instead of integer literals, the CURLPIPE_* constants can also be used. Available as of cURL 7.16.0.

`CURLMOPT_PUSHFUNCTION` (`int`)

- Pass a `callable` that will be registered to handle server pushes and should have the following signature: `int```pushfunction`` `resource` `parent_ch` `resource` `pushed_ch` `array` `headers`

  `parent_ch`

- The parent cURL handle (the request the client made).

`pushed_ch`

- A new cURL handle for the pushed request.

`headers`

- The push promise headers.

The push function is supposed to return either `CURL_PUSH_OK` if it can handle the push, or `CURL_PUSH_DENY` to reject it. Available as of PHP 7.1.0 and cURL 7.44.0