cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Question regarding curl_multi_perform

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 1 Sep 2009 10:08:44 +0200 (CEST)

On Mon, 31 Aug 2009, subbuscenter-curl_at_yahoo.com wrote:

>>> If the curl_multi_perform() call returns CURLM_OK but
>>> sets running_handles to 0, does it mean that curl is done with all its
>>> handles and has nothing else to do?
>>
>> Yes.
>
> Thanks. May be the man page for curl_mutli_perform should mention this...

I think it already does. Can you please suggest a better phrasing that makes
you understand it better than the existing wording?

>>> I also find that if I call curl_multi_info_read(),
>> there is a message, and the status is 0.
>
> I mean the status as set by the call as follows:
>
> int status;
> cc = curl_easy_getinfo(easy_handle, CURLINFO_RESPONSE_CODE, &status);
> // The value of 'cc' is CURLE_OK, and the value of 'status' is 0.
>
> Can I assume that a 0 status here means that it is an error like ECONNRESET
> or ECONNREFUSED?

No, that's not really a valid assumption. As the man page explains:

    "This will be zero if no server response code has been received"

It can be due to a variety of reasons. You should use the individual easy
transfer's return code to see how its transfer did.

-- 
  / daniel.haxx.se
Received on 2009-09-01