aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-05-03 14:50:29 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-05-03 14:50:29 +0000
commitd9a1a59f2242711e287df3b93160e0a2494f23e1 (patch)
tree0fb96aa9c70b175aa2a0ee259cf0ed027937a149
parent0b898b5a8a1998a529bcab8808540a741dcc7ef7 (diff)
CURL_MAX_WRITE_SIZE is a new exported define that informs about the biggest
sized buffer that may be passed to a write callback
-rw-r--r--docs/libcurl/curl_easy_setopt.35
-rw-r--r--include/curl/curl.h2
-rw-r--r--lib/urldata.h2
3 files changed, 6 insertions, 3 deletions
diff --git a/docs/libcurl/curl_easy_setopt.3 b/docs/libcurl/curl_easy_setopt.3
index 5d7d2b91d..34a6b5f06 100644
--- a/docs/libcurl/curl_easy_setopt.3
+++ b/docs/libcurl/curl_easy_setopt.3
@@ -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
diff --git a/include/curl/curl.h b/include/curl/curl.h
index cf96c326d..2d52fb1eb 100644
--- a/include/curl/curl.h
+++ b/include/curl/curl.h
@@ -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,
diff --git a/lib/urldata.h b/lib/urldata.h
index 7480416d4..571ab3015 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -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. */