mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 08:08:50 -05:00
CURL_MAX_WRITE_SIZE is a new exported define that informs about the biggest
sized buffer that may be passed to a write callback
This commit is contained in:
parent
0b898b5a8a
commit
d9a1a59f22
@ -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. */
|
||||
|
Loading…
Reference in New Issue
Block a user