cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: curlopt_seekfunction

From: Erik Ronström <erik.ronstrom_at_doremir.com>
Date: Mon, 3 Oct 2016 21:24:58 +0200

> Probably my understanding is incorrect. When we make the function call "res = curl_easy_setopt(d_curl, CURLOPT_SEEKDATA, userp);" will "userp" not get initialized with a valid pointer value?

No: as stated in the documentation, userp is a ”[d]ata pointer to pass to the seek callback function. If you use the CURLOPT_SEEKFUNCTION option, this is the pointer you'll get as input.”

In other words, it is a custom pointer *you* want to pass on to the seek callback function.

Erik

-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2016-10-03