diff options
author | Richy Kim <richy@fb.com> | 2016-12-20 05:48:15 -0500 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2017-01-19 23:38:04 +0100 |
commit | 6b7616690e5370c21e3a760321af6bf4edbabfb6 (patch) | |
tree | 15ff13a118a311f3a604686103b6d0eaaee6ced4 /include/curl | |
parent | 81cb255cb355ca35453e7297af9cbc8ff7798416 (diff) | |
download | curl-6b7616690e5370c21e3a760321af6bf4edbabfb6.tar.gz |
CURLOPT_BUFFERSIZE: support enlarging receive buffer
Replace use of fixed macro BUFSIZE to define the size of the receive
buffer. Reappropriate CURLOPT_BUFFERSIZE to include enlarging receive
buffer size. Upon setting, resize buffer if larger than the current
default size up to a MAX_BUFSIZE (512KB). This can benefit protocols
like SFTP.
Closes #1222
Diffstat (limited to 'include/curl')
-rw-r--r-- | include/curl/curl.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/curl/curl.h b/include/curl/curl.h index 74ac0350e..467bb0240 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -193,6 +193,11 @@ typedef int (*curl_xferinfo_callback)(void *clientp, curl_off_t ultotal, curl_off_t ulnow); +#ifndef CURL_MAX_READ_SIZE + /* The maximum receive buffer size configurable via CURLOPT_BUFFERSIZE. */ +#define CURL_MAX_READ_SIZE 524288 +#endif + #ifndef CURL_MAX_WRITE_SIZE /* Tests have proven that 20K is a very bad buffer size for uploads on Windows, while 16K for some odd reason performed a lot better. |