1CURLOPT_SEEKDATA(3)        curl_easy_setopt options        CURLOPT_SEEKDATA(3)
2
3
4

NAME

6       CURLOPT_SEEKDATA - pointer passed to the seek callback
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SEEKDATA, void *pointer);
12

DESCRIPTION

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

DEFAULT

18       If you do not set this, NULL is passed to the callback.
19

PROTOCOLS

21       HTTP, FTP, SFTP
22

EXAMPLE

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

AVAILABILITY

38       Added in 7.18.0
39

RETURN VALUE

SEE ALSO

42       CURLOPT_STDERR(3), CURLOPT_DEBUGFUNCTION(3),
43
44
45
46libcurl 8.0.1                  February 07, 2023           CURLOPT_SEEKDATA(3)
Impressum