cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

Re: can libcurl be told that i would like to perform an entire directory listing in one callback call?

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Mon, 18 Oct 2010 23:53:10 -0700

On Mon, Oct 18, 2010 at 06:54:37PM -0700, John Utz wrote:
> I have a few large directories to parse and i am noticing that on some of them
> my writecallback get's called multiple times.
>
> Is this something that i can force to not happen? Yes, i understand that this
> has the ability to block indefinitely if something weird happened with a
> directory listing, so i probably wouldnt use it in production, but it would be
> super handy for my current development purposes.

libcurl normally sends data to the write callback as soon as it comes in;
there's generally no point in buffering it. However, you could try
immediately pausing the data stream with curl_easy_pause() then unpausing
it some time later when you think the data has all arrived. That should
give it to you all in one chunk. It won't be very efficient, but it might do
for your purposes.

>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-10-19

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET