1CURLOPT_RESOLVER_START_DATA(c3u)rl_easy_setopt optioCnUsRLOPT_RESOLVER_START_DATA(3)
2
3
4

NAME

6       CURLOPT_RESOLVER_START_DATA  -  custom  pointer  passed to the resolver
7       start callback
8

SYNOPSIS

10       #include <curl/curl.h>
11
12       CURLcode  curl_easy_setopt(CURL  *handle,  CURLOPT_RESOLVER_START_DATA,
13       void *pointer);
14

DESCRIPTION

16       Pass  a  pointer  that  will  be untouched by libcurl and passed as the
17       third  argument  in  the  resolver  start  callback   set   with   CUR‐
18       LOPT_RESOLVER_START_FUNCTION(3).
19

DEFAULT

21       NULL
22

PROTOCOLS

24       All
25

EXAMPLE

27       static int resolver_start_cb(void *resolver_state, void *reserved,
28                                    void *userdata)
29       {
30         (void)reserved;
31         printf("Received resolver_state=%p userdata=%p\n",
32                resolver_state, userdata);
33         return 0;
34       }
35
36       CURL *curl = curl_easy_init();
37       if(curl) {
38         curl_easy_setopt(curl, CURLOPT_RESOLVER_START_FUNCTION, resolver_start_cb);
39         curl_easy_setopt(curl, CURLOPT_RESOLVER_START_DATA, curl);
40         curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
41         curl_easy_perform(curl);
42         curl_easy_cleanup(curl);
43       }
44

AVAILABILITY

46       Added in 7.59.0
47

RETURN VALUE

49       Returns CURLE_OK
50

SEE ALSO

52       CURLOPT_RESOLVER_START_FUNCTION(3)
53
54
55
56libcurl 7.61.1                 February 14, 2018CURLOPT_RESOLVER_START_DATA(3)
Impressum