1 .\" **************************************************************************
3 .\" * Project ___| | | | _ \| |
4 .\" * / __| | | | |_) | |
5 .\" * | (__| |_| | _ <| |___
6 .\" * \___|\___/|_| \_\_____|
8 .\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
10 .\" * This software is licensed as described in the file COPYING, which
11 .\" * you should have received as part of this distribution. The terms
12 .\" * are also available at https://curl.haxx.se/docs/copyright.html.
14 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
15 .\" * copies of the Software, and permit persons to whom the Software is
16 .\" * furnished to do so, under the terms of the COPYING file.
18 .\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 .\" * KIND, either express or implied.
21 .\" **************************************************************************
23 .TH CURLOPT_IOCTLFUNCTION 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
25 CURLOPT_IOCTLFUNCTION \- callback for I/O operations
28 #include <curl/curl.h>
31 CURLIOE_OK, /* I/O operation successful */
32 CURLIOE_UNKNOWNCMD, /* command was unknown to callback */
33 CURLIOE_FAILRESTART, /* failed to restart the read */
34 CURLIOE_LAST /* never use */
38 CURLIOCMD_NOP, /* no operation */
39 CURLIOCMD_RESTARTREAD, /* restart the read stream from start */
40 CURLIOCMD_LAST /* never use */
43 curlioerr ioctl_callback(CURL *handle, int cmd, void *clientp);
45 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_IOCTLFUNCTION, ioctl_callback);
47 Pass a pointer to your callback function, which should match the prototype
50 This callback function gets called by libcurl when something special
51 I/O-related needs to be done that the library can't do by itself. For now,
52 rewinding the read data stream is the only action it can request. The
53 rewinding of the read data stream may be necessary when doing a HTTP PUT or
54 POST with a multi-pass authentication method.
56 The callback MUST return \fICURLIOE_UNKNOWNCMD\fP if the input \fIcmd\fP is
57 not \fICURLIOCMD_RESTARTREAD\fP.
59 The \fIclientp\fP argument to the callback is set with the
60 \fICURLOPT_IOCTLDATA(3)\fP option.
62 This option is deprecated! Do not use it. Use \fICURLOPT_SEEKFUNCTION(3)\fP
63 instead to provide seeking! If \fICURLOPT_SEEKFUNCTION(3)\fP is set, this
64 parameter will be ignored when seeking.
66 By default, this parameter is set to NULL. Not used.
74 Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
76 .BR CURLOPT_IOCTLDATA "(3), " CURLOPT_SEEKFUNCTION "(3), "