CURLOPT_RESOLVER_START_DATA(3)
β¨ CURLOPT_RESOLVER_START_DATA(3) β¨
okay bestie so this is a libcurl manual page, and honestly? it's a tiny one but it's kind of a vibe. it's all about CURLOPT_RESOLVER_START_DATA β the little pointer you hand over to your resolver start callback. lowkey iconic that something this small exists. let's get into it π«Ά
πΈ NAME πΈ
CURLOPT_RESOLVER_START_DATA β pointer passed to the resolver start callback
π SYNOPSIS π
#include <curl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RESOLVER_START_DATA,
void *pointer);
π¦ DESCRIPTION π¦
so here's the tea: you pass in a pointer, and libcurl literally does not touch it. it's untouched. it's sacred. libcurl keeps its hands off and just forwards it straight through as the third argument in the resolver start callback β the one you set with CURLOPT_RESOLVER_START_FUNCTION(3). that's it. that's the whole job. you give it a pointer, it hands it back to you later. no cap, that's the deal π
π DEFAULT π
NULL
like, nothing. nada. the void. π³οΈ
π PROTOCOLS π
this functionality affects all supported protocols β every single one, periodt β¨
β EXAMPLE β
here's a whole little program, and honestly the way it just sets everything up and goes? main character energy π₯
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;
}
int main(void)
{
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, "https://example.com");
curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
see how it sets the data to curl? yup. that's the pointer round-trip in action, bestie π
π AVAILABILITY π
Added in curl 7.59.0 β so she's been around a minute, iykyk.
π₯ RETURN VALUE π₯
curl_easy_setopt(3) returns a CURLcode indicating success or error, fr fr.
CURLE_OK(0) means everything was OK β¨- non-zero means an error occurred β go check
libcurl-errors(3)to see what went down π
π§ SEE ALSO π§
and that's the whole page, bestie π this was the libcurl manual, dated 2026-10-12, page CURLOPT_RE..._START_DATA(3) β go forth and pass your pointers with confidence π
β¨
π¦ where this page comes from
- fedora 44: libcurl-devel 8.18.0-14.fc44 Β· curl
- fedora 44: libcurl-devel 8.18.0-14.fc44 Β· curl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms