diff options
Diffstat (limited to 'docs/libcurl/opts/CURLOPT_BUFFERSIZE.3')
-rw-r--r-- | docs/libcurl/opts/CURLOPT_BUFFERSIZE.3 | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/docs/libcurl/opts/CURLOPT_BUFFERSIZE.3 b/docs/libcurl/opts/CURLOPT_BUFFERSIZE.3 index dc5bf74f2..5d9b065af 100644 --- a/docs/libcurl/opts/CURLOPT_BUFFERSIZE.3 +++ b/docs/libcurl/opts/CURLOPT_BUFFERSIZE.3 @@ -43,7 +43,19 @@ CURL_MAX_WRITE_SIZE (16kB) .SH PROTOCOLS All .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "sftp://example.com/foo.bin"); + + /* ask libcurl to allocate a larger receive buffer */ + curl_easy_setopt(curl, CURLOPT_BUFFERSIZE, 120000L); + + ret = curl_easy_perform(curl); + + curl_easy_cleanup(curl); +} +.fi .SH AVAILABILITY Added in 7.10. Growing the buffer was added in 7.53.0. .SH RETURN VALUE |