cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: multi-handle and information about specific easy-handle

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Sun, 3 Oct 2004 19:42:13 +0200 (CEST)

On Sun, 3 Oct 2004, Joachim Heymanns wrote:

> When using the easy-interface, I can get basic information by the CURLcode
> returned by curl_easy_perform, f.e. if connection to host failed (=7) or the
> interface was not ok (=45).
>
> But when using some easy-handles with a multi-handle, I have no idea, how to
> get this kind of information, as I do not call curl_easy_perform.
>
> Is there a way to get the CURLcode, that would be returned by
> curl_easy_perform, when using an easy-handle within a multi-handle?

Yes, when you call curl_multi_perform() and the number of 'running_handles'
is changed from the previous call you know that there is one or more transfers
less "running".

You can then call curl_multi_info_read() to get information about each
individual completed transfer, and that returned info includes the CURLcode.

I'll try to include a paragraph about this in the curl_multi_perform() man
page as several people have asked this same question lately...

-- 
      Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
       Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2004-10-03