cURL / Mailing Lists / curl-library / Single Mail


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

From: Dan Fandrich <>
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:
Received on 2010-10-19