<?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> <refentry xml:id="function.curl-multi-setopt" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <refnamediv> <refname>curl_multi_setopt</refname> <refpurpose>Set an option for the cURL multi handle</refpurpose> </refnamediv> <refsect1 role="description"> &reftitle.description; <methodsynopsis> <type>bool</type><methodname>curl_multi_setopt</methodname> <methodparam><type>resource</type><parameter>mh</parameter></methodparam> <methodparam><type>int</type><parameter>option</parameter></methodparam> <methodparam><type>mixed</type><parameter>value</parameter></methodparam> </methodsynopsis> <para> </para> &warn.undocumented.func; </refsect1> <refsect1 role="parameters"> &reftitle.parameters; <variablelist> <varlistentry> <term><parameter>mh</parameter></term> <listitem> <para> </para> </listitem> </varlistentry> <varlistentry> <term><parameter>option</parameter></term> <listitem> <para> One of the <constant>CURLMOPT_*</constant> constants. </para> </listitem> </varlistentry> <varlistentry> <term><parameter>value</parameter></term> <listitem> <para> The value to be set on <parameter>option</parameter>. </para> <para> <parameter>value</parameter> should be an <type>int</type> for the following values of the <parameter>option</parameter> parameter: <informaltable> <tgroup cols="3"> <thead> <row> <entry valign="top">Option</entry> <entry valign="top">Set <parameter>value</parameter> to</entry> </row> </thead> <tbody> <row> <entry valign="top"><constant>CURLMOPT_PIPELINING</constant></entry> <entry valign="top"> 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. </entry> </row> <row> <entry valign="top"><constant>CURLMOPT_MAXCONNECTS</constant></entry> <entry valign="top"> Pass a number that will be used as 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 <function>curl_multi_add_handle</function>. When the cache is full, curl closes the oldest one in the cache to prevent the number of open connections from increasing. </entry> </row> <row> <entry valign="top"><constant>CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE</constant></entry> <entry valign="top"> Pass a number that specifies the chunk length threshold for pipelining in bytes. </entry> </row> <row> <entry valign="top"><constant>CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE</constant></entry> <entry valign="top"> Pass a number that specifies the size threshold for pipelining penalty in bytes. </entry> </row> <row> <entry valign="top"><constant>CURLMOPT_MAX_HOST_CONNECTIONS</constant></entry> <entry valign="top"> Pass a number that specifies the maximum number of connections to a single host. </entry> </row> <row> <entry valign="top"><constant>CURLMOPT_MAX_PIPELINE_LENGTH</constant></entry> <entry valign="top"> Pass a number that specifies the maximum number of requests in a pipeline. </entry> </row> <row> <entry valign="top"><constant>CURLMOPT_MAX_TOTAL_CONNECTIONS</constant></entry> <entry valign="top"> Pass a number that specifies the maximum number of simultaneously open connections. </entry> </row> </tbody> </tgroup> </informaltable> </para> </listitem> </varlistentry> </variablelist> </refsect1> <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> &return.success; </para> </refsect1> <refsect1 role="changelog"> &reftitle.changelog; <para> <informaltable> <tgroup cols="2"> <thead> <row> <entry>&Version;</entry> <entry>&Description;</entry> </row> </thead> <tbody> <row> <entry>7.0.7</entry> <entry> Introduced <constant>CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE</constant>, <constant>CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE</constant>, <constant>CURLMOPT_MAX_HOST_CONNECTIONS</constant>, <constant>CURLMOPT_MAX_PIPELINE_LENGTH</constant> and <constant>CURLMOPT_MAX_TOTAL_CONNECTIONS</constant>. </entry> </row> </tbody> </tgroup> </informaltable> </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"~/.phpdoc/manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->