diff options
author | Daniel Stenberg <daniel@haxx.se> | 2017-05-05 17:26:08 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2017-05-05 17:26:08 +0200 |
commit | 2b7bde4d3f08f1414fd73cb908d60e53949c33da (patch) | |
tree | 65d702e850362f2cf046acad30322e8e45478656 /docs/libcurl/opts/CURLOPT_BUFFERSIZE.3 | |
parent | 58a6265a40bce369ba523364905489dcc6a11551 (diff) | |
download | curl-2b7bde4d3f08f1414fd73cb908d60e53949c33da.tar.gz |
docs/opts: 24 more man pages now have examples
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 |