GNURLOPT_R...START_DATA(3)
π NAME π
Okay bestie, this is the curl_easy_setopt options manual page from gnurl β the one with the header GNURLOPT_R...START_DATA(3) β and it is literally about CURLOPT_RESOLVER_START_DATA, aka the custom pointer you pass to the resolver start callback. π
β¨ SYNOPSIS β¨
#include <gnurl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RESOLVER_START_DATA,
void *pointer);
π¦ DESCRIPTION π¦
You pass in a pointer, and libcurl is gonna leave that pointer completely untouched β no cap, untouched β then hand it over as the third argument in the resolver start callback that you set with CURLOPT_RESOLVER_START_FUNCTION(3). That's the whole vibe. π«Ά
πΈ DEFAULT πΈ
NULL
π PROTOCOLS π
All of them, bestie. Literally all.
π EXAMPLE π
static int resolver_start_cb(void *resolver_state, void *reserved,
void *userdata)
{
(void)reserved;
printf("Received resolver_state=%p userdata=%p\n",
resolver_state, userdata);
return 0;
}
CURL *curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_RESOLVER_START_FUNCTION, resolver_start_cb);
curl_easy_setopt(curl, CURLOPT_RESOLVER_START_DATA, curl);
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
β AVAILABILITY β
Added in 7.59.0. iconic behavior, honestly.
π RETURN VALUE π
Returns CURLE_OK. slay.
π SEE ALSO π
Signed, sealed, and delivered by libcurl 7.59.0 on 14 Feb 2018, with the footer tag GNURLOPT_R...START_DATA(3) β periodt. πβ¨
π¦ where this page comes from
- nixos 26.05: libgnurl 7.72.0
- nixpkgs unstable: libgnurl 7.72.0
- Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms