1
.\" $Id: curl_multi_setopt.3,v 1.1 2006/01/15 23:15:24 bagder Exp $
3
.TH curl_multi_setopt 3 "8 Jan 2006" "libcurl 7.16.0" "libcurl Manual"
5
curl_multi_setopt \- set options for a curl multi handle
9
CURLMcode curl_multi_setopt(CURLM * multi_handle, CURLMoption option, param);
11
curl_multi_setopt() is used to tell a libcurl multi handle how to behave. By
12
using the appropriate options to \fIcurl_multi_setopt\fP, you can change
13
libcurl's behaviour when using that multi handle. All options are set with
14
the \fIoption\fP followed by the parameter \fIparam\fP. That parameter can be
15
a \fBlong\fP, a \fBfunction pointer\fP, an \fBobject pointer\fP or a
16
\fBcurl_off_t\fP type, depending on what the specific option expects. Read
17
this manual carefully as bad input values may cause libcurl to behave badly!
18
You can only set one option in each function call.
21
.IP CURLMOPT_SOCKETFUNCTION
22
Pass a pointer to a function matching the curl_socket_callback prototype. The
23
\fIcurl_multi_socket(3)\fP functions inform the application about updates in
24
the socket (file descriptor) status by doing none, one or multiple calls to
25
the curl_socket_callback given in the \fBparam\fP argument. They update the
26
status with changes since the previous time a \fIcurl_multi_socket(3)\fP
27
function was called. If the given callback pointer is NULL, no callback will
28
be called. Set the callback's fourth argument with \fICURLMOPT_SOCKETDATA\fP.
29
See \fIcurl_multi_socket(3)\fP for more callback details.
30
.IP CURLMOPT_SOCKETDATA
31
Pass a pointer to whatever you want passed to the curl_socket_callback's forth
32
argument, the userp pointer. This is not used by libcurl but only passed-thru
33
as-is. Set the callback pointer with \fICURLMOPT_SOCKETFUNCTION\fP.
35
The standard CURLMcode for multi interface error codes. Note that it returns a
36
CURLM_UNKNOWN_OPTION if you try setting an option that this version of libcurl
39
This function was added in libcurl 7.16.0
41
.BR curl_multi_cleanup "(3), " curl_multi_init "(3), "
42
.BR curl_multi_socket "(3), " curl_multi_info_read "(3)"