1CURLOPT_DEBUGDATA(3)       curl_easy_setopt options       CURLOPT_DEBUGDATA(3)
2
3
4

NAME

6       CURLOPT_DEBUGDATA - custom pointer for debug callback
7

SYNOPSIS

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

DESCRIPTION

15       Pass a pointer to whatever you want passed in  to  your  CURLOPT_DEBUGā€
16       FUNCTION(3)  in  the  last void * argument. This pointer is not used by
17       libcurl, it is only passed to the callback.
18

DEFAULT

20       NULL
21

PROTOCOLS

23       All
24

EXAMPLE

26       int main(void)
27       {
28         CURL *curl;
29         CURLcode res;
30         struct data my_tracedata;
31
32         curl = curl_easy_init();
33         if(curl) {
34           curl_easy_setopt(curl, CURLOPT_DEBUGFUNCTION, my_trace);
35
36           curl_easy_setopt(curl, CURLOPT_DEBUGDATA, &my_tracedata);
37
38           /* the DEBUGFUNCTION has no effect until we enable VERBOSE */
39           curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
40
41           curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
42           res = curl_easy_perform(curl);
43
44           /* always cleanup */
45           curl_easy_cleanup(curl);
46         }
47         return 0;
48       }
49

AVAILABILITY

51       Always
52

RETURN VALUE

54       Returns CURLE_OK
55

SEE ALSO

57       CURLOPT_STDERR(3), CURLOPT_DEBUGFUNCTION(3),
58
59
60
61libcurl 7.79.1                September 01, 2021          CURLOPT_DEBUGDATA(3)
Impressum