Skip to content
Snippets Groups Projects
Commit d9a1a59f authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

CURL_MAX_WRITE_SIZE is a new exported define that informs about the biggest

sized buffer that may be passed to a write callback
parent 0b898b5a
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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,
......
......@@ -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. */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment