1CURLOPT_SEEKDATA(3) libcurl CURLOPT_SEEKDATA(3)
2
3
4
6 CURLOPT_SEEKDATA - pointer passed to the seek callback
7
9 #include <curl/curl.h>
10
11 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SEEKDATA, void *pointer);
12
14 Data pointer to pass to the seek callback function. If you use the CUR‐
15 LOPT_SEEKFUNCTION(3) option, this is the pointer you will get as input.
16
18 If you do not set this, NULL is passed to the callback.
19
21 HTTP, FTP, SFTP
22
24 static int seek_cb(void *clientp, curl_off_t offset, int origin)
25 {
26 struct data *d = (struct data *)clientp;
27 lseek(d->our_fd, offset, origin);
28 return CURL_SEEKFUNC_OK;
29 }
30
31 {
32 struct data seek_data;
33 curl_easy_setopt(CURL *handle, CURLOPT_SEEKFUNCTION, seek_cb);
34 curl_easy_setopt(CURL *handle, CURLOPT_SEEKDATA, &seek_data);
35 }
36
38 Added in 7.18.0
39
42 CURLOPT_STDERR(3), CURLOPT_DEBUGFUNCTION(3),
43
44
45
46ibcurl 8.2.1 April 26, 2023 CURLOPT_SEEKDATA(3)