cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Socket interface/curl_multi_socket_all()

From: Michael Wallner <mike_at_iworks.at>
Date: Wed, 16 May 2007 19:41:20 +0200

Michael Wallner wrote:
> Manuel Jung wrote:
>
>> I can add new easy_handles at between step 6 and 9? Is that right? If all
>> downloads were done, but later ill have todo some again, can i still stay in
>> the 6 to 9 loop or do i have to call curl_multi_socket_all() first, and go
>> then back in the loop?
>
> Please "read the fine archives" ;)
> There were[1] and seem to be[2] problems with this approach.

> [2] http://comments.gmane.org/gmane.comp.web.curl.library/14493

I have to correct myself. Actually, calling

        while (CURLM_CALL_MULTI_PERFORM==curl_multi_socket_all());

after curl_multi_add_handle, when (only when) curl_multi_socket_all
had already been called once, fixes the issues 99% of the time for me.

Still there are cases where the test program exits with a fraction
of the requests added/finished. No idea yet why this happens.

Regards,

-- 
Michael
Received on 2007-05-16