curl-library
Question regarding curl_multi_perform
Date: Sat, 29 Aug 2009 18:51:12 -0700 (PDT)
Hi,
I have a question regarding curl_multi_perform().
My program does the following in sequence:
curl_multi_init()
curl_easy_init()
curl_multi_add_handle
curl_multi_perform(multi_handle, &running_handles); // as many times as needed
curl_multi_fdset()
select()
After calling curl_multi_perform() as many times as it asks me to, I find that it returns CURLM_OK but ests running_handles to 0. (Turns out that the connection got an ECONNREFUSED). If I ignored this situation and went ahead with the curl_multi_fdset(), then I find that curl_multi_fdset() sets maxfd to -1.
The question is:
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? so, no need to call curl_multi_perform again for these set of multi handles?
I also find that if I call curl_multi_info_read(), there is a message, and the status is 0.
Does 0 status mean that curl faced some error (such as ECONNREFUSED, ECONNRESET, etc.) and there is no point trying again (by calling curl_multi_perform)?
thanks.
-Subbu
Received on 2009-08-30