]> granicus.if.org Git - curl/commitdiff
CURL_MAX_WRITE_SIZE is a new exported define that informs about the biggest
authorDaniel Stenberg <daniel@haxx.se>
Fri, 3 May 2002 14:50:29 +0000 (14:50 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 3 May 2002 14:50:29 +0000 (14:50 +0000)
sized buffer that may be passed to a write callback

docs/libcurl/curl_easy_setopt.3
include/curl/curl.h
lib/urldata.h

index 5d7d2b91d9a61b0c75c3e74010c65849390d0c8a..34a6b5f06c080d7a23a3fa032418ace2dd2cc80d 100644 (file)
@@ -2,7 +2,7 @@
 .\" nroff -man [file]
 .\" $Id$
 .\"
-.TH curl_easy_setopt 3 "30 Apr 2002" "libcurl 7.9.6" "libcurl Manual"
+.TH curl_easy_setopt 3 "3 May 2002" "libcurl 7.9.6" "libcurl Manual"
 .SH NAME
 curl_easy_setopt - Set curl easy-session options
 .SH SYNOPSIS
@@ -60,7 +60,8 @@ Set the \fIstream\fP argument with the \fBCURLOPT_FILE\fP option.
 
 \fBNOTE:\fP you will be passed as much data as possible in all invokes, but
 you cannot possibly make any assumptions. It may be one byte, it may be
-thousands.
+thousands. The maximum amount of data that can be passed to the write callback
+is defined in the curl.h header file: CURL_MAX_WRITE_SIZE.
 .TP
 .B CURLOPT_INFILE
 Data pointer to pass to the file read function. Note that if you specify the
index cf96c326daf443556f2b82d84291ae264e343a0e..2d52fb1eb07b4de8fe91f4f7db539b21398e3fc3 100644 (file)
@@ -86,6 +86,8 @@ typedef int (*curl_progress_callback)(void *clientp,
                                       double ultotal,
                                       double ulnow);
 
+#define CURL_MAX_WRITE_SIZE 20480
+
 typedef size_t (*curl_write_callback)(char *buffer,
                                       size_t size,
                                       size_t nitems,
index 7480416d466c4528e2c32b6122942a7b8cbc45bc..571ab3015b53976a3b7de88196b1d2ce5a746366 100644 (file)
@@ -83,7 +83,7 @@
 #include "http_chunks.h" /* for the structs and enum stuff */
 
 /* Download buffer size, keep it fairly big for speed reasons */
-#define BUFSIZE (1024*20)
+#define BUFSIZE CURL_MAX_WRITE_SIZE
 
 /* Initial size of the buffer to store headers in, it'll be enlarged in case
    of need. */