curl-library
Re: How to make curl_easy_perform return immediately
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 22 Nov 2007 16:25:52 +0100 (CET)
Date: Thu, 22 Nov 2007 16:25:52 +0100 (CET)
On Thu, 22 Nov 2007, Bruce Peng wrote:
> When i download file (HTTP) using libcurl, sometimes, it just wait there and
> no data received. So, i want make curl_easy_perform return immediately, can
> somebody tell me how? thanks
curl_easy_perform() does the request in a fully synchronous manner and it
returns when the entire operation is done. That _can_ be very quick but it can
also be very slow. There's nothing you or libcurl can do about that.
You can use a timeout to stop slow operations, or you can switch to the multi
interface which is non-blocking and thus all (at least most) function calls
return very quickly.
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.htmlReceived on 2007-11-22