cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Deferred Synchronous using Multi Interface

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 25 Jun 2002 08:59:45 +0200 (MET DST)

On Mon, 24 Jun 2002 Priya.Ramakrishnan_at_WellsFargo.COM wrote:

> I have started using libcurl 7.9.7 recently so that i can do non blocking
> http connection. I am working on a C++ wrapper around Curl and Open SSL.

This seems to be a common habit. I trust you're aware of Jean-Philippe
Barrette-LaPierre's work: http://curl.haxx.se/libcurl/cplusplus/

I would also recommend you to upgrade to 7.9.8, as the multi interface is
still developing and several things were fixed for it in this release.

> Can you tell me how to relate between a particular easy handle and the
> fd_set or socket id.
>
> Would really appreciate if someone could help me with this information. Or
> i need to know when the Perform has been completed and when all the data
> have been received so that it can retrieved by the clients code.

This was slightly altered/corrected in 7.9.8:

Using curl_multi_perform() you will know when one or more handles complete,
thanks to the 'running_handles' number you get back in the integer you pass a
pointer to in the second argument.

Calling curl_multi_info_read() when you've detected that a handle has
finished, you'll get a "message" back that'll tell you both which curl handle
that completed and the CURLcode return code from that particular transfer.

Isn't this what you wanted?

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
-------------------------------------------------------
Sponsored by:
ThinkGeek at http://www.ThinkGeek.com/
Received on 2002-06-25