Manual Pages for UNIX Darwin command on man curl_multi_setopt
MyWebUniversity

Manual Pages for UNIX Darwin command on man curl_multi_setopt

curlmultisetopt(3) libcurl Manual curlmultisetopt(3)

NAME

curlmultisetopt - set options for a curl multi handle

SYNOPSIS

#include

CURLMcode curlmultisetopt(CURLM * multihandle, CURLMoption option, param);

DESCRIPTION

curlmultisetopt() is used to tell a libcurl multi handle how to behave. By using the appropriate options to curlmultisetopt(3), you can change libcurl's behaviour when using that multi handle. All options are set with the option followed by the parameter param. That parameter can be a lloonngg, a ffuunnccttiioonn ppooiinntteerr, an oobbjjeecctt ppooiinntteerr or a ccuurrlloofffftt type, depending on what the specific option expects. Read this manual carefully as bad input values may cause libcurl to behave badly! You can only set one option in each function call. OOPPTTIIOONNSS CURLMOPTSOCKETFUNCTION Pass a pointer to a function matching the ccuurrllssoocckkeettccaallllbbaacckk

prototype. The curlmultisocket(3) functions inform the appli-

cation about updates in the socket (file descriptor) status by doing none, one or multiple calls to the curlsocketcallback given in the ppaarraamm argument. They update the status with changes since the previous time a curlmultisocket(3) function was called. If the given callback pointer is NULL, no callback will

be called. Set the callback's uusseerrpp argument with CURLMOPTSOCK-

ETDATA. See curlmultisocket(3) for more callback details. CURLMOPTSOCKETDATA Pass a pointer to whatever you want passed to the ccuurrllssoocckkeettccaallllbbaacckk's forth argument, the userp pointer. This

is not used by libcurl but only passed-thru as-is. Set the call-

back pointer with CURLMOPTSOCKETFUNCTION. CURLMOPTPIPELINING Pass a long set to 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 han-

dle. 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 rather than being executed in parallell. (Added in 7.16.0) CURLMOPTTIMERFUNCTION

Pass a pointer to a function matching the ccuurrllmmuullttiittiimmeerrccaallll-

bbaacckk prototype. This function will then be called when the timeout value changes. The timeout value is at what latest time the application should call one of the "performing" functions of the multi interface (curlmultisocket(3),

curlmultisocketall(3) and curlmultiperform(3)) - to allow

libcurl to keep timeouts and retries etc to work. Libcurl

attempts to limit calling this only when the fixed future time-

out time actually change. See also CURLMOPTTIMERDATA. This callback can be used instead of, or in addition to, curlmultitimeout(3). (Added in 7.16.0) CURLMOPTTIMERDATA Pass a pointer to whatever you want passed to the ccuurrllmmuullttiittiimmeerrccaallllbbaacckk's third argument, the userp pointer.

This is not used by libcurl but only passed-thru as-is. Set the

callback pointer with CURLMOPTTIMERFUNCTION. (Added in 7.16.0) CURLMOPTMAXCONNECTS Pass a long. The set number will be used as the maximum amount of simultaneously open connections that libcurl may cache. Default is 10, and libcurl will enlarge the size for each added

easy handle to make it fit 4 times the number of added easy han-

dles. By setting this option, you can prevent the cache size to grow beyond the limit set by you. When the cache is full, curl closes the oldest one in the cache to prevent the number of open connections to increase. This option is for the multi handle's use only, when using the easy interface you should instead use the CURLOPTMAXCONNECTS option. (Added in 7.16.3) RREETTUURRNNSS The standard CURLMcode for multi interface error codes. Note that it

returns a CURLMUNKNOWNOPTION if you try setting an option that this

version of libcurl doesn't know of. AVAILABILITY This function was added in libcurl 7.15.4.

SEE ALSO

ccuurrllmmuullttiicclleeaannuupp(3), ccuurrllmmuullttiiiinniitt(3), ccuurrllmmuullttiissoocckkeett(3), ccuurrllmmuullttiiiinnffoorreeaadd(3) libcurl 7.16.0 10 Oct 2006 curlmultisetopt(3)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™