summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-09-22 10:15:10 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-09-22 10:15:10 +0000
commitda192f79553fb1b6eb112fd68cee7b01e0a56540 (patch)
tree0eda9b0e6ea2ba4237ff77252b79d8d43390a88d
parenta2210d23c3b301d5413becad5a9e5a8b82cae664 (diff)
downloadgnurl-da192f79553fb1b6eb112fd68cee7b01e0a56540.tar.gz
gnurl-da192f79553fb1b6eb112fd68cee7b01e0a56540.tar.bz2
gnurl-da192f79553fb1b6eb112fd68cee7b01e0a56540.zip
clarify what the default read callback does and how it uses the READDATA
option
-rw-r--r--docs/libcurl/curl_easy_setopt.315
1 files changed, 10 insertions, 5 deletions
diff --git a/docs/libcurl/curl_easy_setopt.3 b/docs/libcurl/curl_easy_setopt.3
index fe54aeebd..565527f7a 100644
--- a/docs/libcurl/curl_easy_setopt.3
+++ b/docs/libcurl/curl_easy_setopt.3
@@ -21,7 +21,7 @@
.\" * $Id$
.\" **************************************************************************
.\"
-.TH curl_easy_setopt 3 "4 Sep 2005" "libcurl 7.14.2" "libcurl Manual"
+.TH curl_easy_setopt 3 "22 Sep 2005" "libcurl 7.14.2" "libcurl Manual"
.SH NAME
curl_easy_setopt - set options for a curl easy handle
.SH SYNOPSIS
@@ -136,13 +136,18 @@ server expected it, like when you've told you will upload N bytes and you
upload less than N bytes), you may experience that the server "hangs" waiting
for the rest of the data that won't come.
-In libcurl 7.12.1 and later, the read callback may return
-\fICURL_READFUNC_ABORT\fP to stop the current operation at once, with a
-\fICURLE_ABORTED_BY_CALLBACK\fP error code from the transfer.
+The read callback may return \fICURL_READFUNC_ABORT\fP to stop the current
+operation immediately, resulting in a \fICURLE_ABORTED_BY_CALLBACK\fP error
+code from the transfer (Added in 7.12.1)
+
+If you set the callback pointer to NULL, or doesn't set it at all, the default
+internal read function will be used. It is simply doing an fread() on the FILE
+* stream set with \fICURLOPT_READDATA\fP.
.IP CURLOPT_READDATA
Data pointer to pass to the file read function. If you use the
\fICURLOPT_READFUNCTION\fP option, this is the pointer you'll get as input. If
-you don't specify a read callback, this must be a valid FILE *.
+you don't specify a read callback but instead rely on the default internal
+read function, this data must be a valid readable FILE *.
If you're using libcurl as a win32 DLL, you MUST use a
\fICURLOPT_READFUNCTION\fP if you set this option.