cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Control the download

From: Julien Chaffraix <julien.chaffraix_at_gmail.com>
Date: Thu, 22 Sep 2011 07:28:34 -0700

>> 1.  Example 1: getting the file in chunks of 100KB (chunk by chunk).
>
> You can't. libcurl will deliver data as it thinks is good and you'll have to
> adapt. If you need to wait for 100K before you can do anything, then just
> buffer data until you have enough!

There may be a way using CURLOPT_RANGE as we are using HTTP. You would
need the server to support it though. The overhead would be terrible
and I would not recommend transferring chunks of 100K unless you own
the server but it is theoretically possible. Daniel's caveat about
buffering still applies as you won't get one chunk in your read
callback.

Julien

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-09-22