![]() |
![]()
| ![]() |
![]()
NAMECURLOPT_IOCTLFUNCTION - callback for I/O operations SYNOPSIS#include <curl/curl.h> typedef enum { DESCRIPTIONPass a pointer to your callback function, which should match the prototype shown above. This callback function gets called by libcurl when something special I/O-related needs to be done that the library cannot do by itself. For now, rewinding the read data stream is the only action it can request. The rewinding of the read data stream may be necessary when doing an HTTP PUT or POST with a multi-pass authentication method. The callback MUST return CURLIOE_UNKNOWNCMD if the input cmd is not CURLIOCMD_RESTARTREAD. The clientp argument to the callback is set with the CURLOPT_IOCTLDATA(3) option. This option is deprecated. Do not use it. Use CURLOPT_SEEKFUNCTION(3) instead to provide seeking. If CURLOPT_SEEKFUNCTION(3) is set, this parameter is ignored when seeking. DEFAULTNULL PROTOCOLSThis functionality affects all supported protocols EXAMPLE#include <unistd.h> /* for lseek */ struct data { DEPRECATEDDeprecated since 7.18.0. AVAILABILITYAdded in curl 7.12.3 RETURN VALUEcurl_easy_setopt(3) returns a CURLcode indicating success or error. CURLE_OK (0) means everything was OK, non-zero means an error occurred, see libcurl-errors(3). SEE ALSOCURLOPT_IOCTLDATA(3), CURLOPT_SEEKFUNCTION(3)
|