1CURLINFO_PRIVATE(3)        curl_easy_getinfo options       CURLINFO_PRIVATE(3)
2
3
4

NAME

6       CURLINFO_PRIVATE - get the private pointer
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode  curl_easy_getinfo(CURL *handle, CURLINFO_PRIVATE, char **pri‐
12       vate);
13

DESCRIPTION

15       Pass a pointer to a char pointer to receive the pointer to the  private
16       data associated with the curl handle (set with the CURLOPT_PRIVATE(3)).
17       Please note that for internal reasons, the value is returned as a  char
18       pointer, although effectively being a 'void *'.
19

PROTOCOLS

21       All
22

EXAMPLE

24       CURL *curl = curl_easy_init();
25       if(curl) {
26         void *pointer = 0x2345454;
27         curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/foo.bin");
28
29         /* set the private pointer */
30         curl_easy_setopt(curl, CURLOPT_PRIVATE, pointer);
31         ret = curl_easy_perform(curl);
32
33         /* extract the private pointer again */
34         ret = curl_easy_getinfo(curl, CURLINFO_PRIVATE, &pointer);
35
36         curl_easy_cleanup(curl);
37       }
38

AVAILABILITY

40       Added in 7.10.3
41

RETURN VALUE

43       Returns  CURLE_OK  if the option is supported, and CURLE_UNKNOWN_OPTION
44       if not.
45

SEE ALSO

47       curl_easy_getinfo(3), curl_easy_setopt(3), CURLOPT_PRIVATE(3),
48
49
50
51libcurl 7.61.1                   May 05, 2017              CURLINFO_PRIVATE(3)
Impressum