cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: cURL multi interface question.

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 26 Jan 2006 10:47:56 +0100 (CET)

On Wed, 25 Jan 2006, Anton Rakovchuk wrote:

> Thanks, Brian, looks like it is a decent way to get completetion
> information.

Each call to curl_multi_perform() returns the number of "alive" transfers in
the integer you pass a pointer to in the second argument. When the counter
changes, you know how many transfers that were completed.

> Although, I have another question regarding multi interface. The application
> I am working on is using poll instead of select. Is there a way to get hold
> on the list of actual sockets/file descriptor?

No, not in the current API. You will in the future, by the use of the new
curl_multi_socket() call. Details on my work on this is found here:
http://curlm.haxx.se/libcurl/hiper/

> I would prefer to have some callback, which would inform me on the operation
> I have to do, like adding socket into the array for polling or removing it,
> or changing the event mask. I saw some information about 7.16 version where
> some such functions are coming up, but I haven't found any information
> regarding when this version will be available.

Right, that's what I point to above. And with that new API you'll get that
callback in the manner you describe, telling you when the sockets' states
change.

There's no set date for the 7.16/curl_multi_socket() release. I hope to get
back to work on "project hiper" later this spring and then I should be able to
produce a first release within a few weeks or so. But these plans are not
carved in stone (as they depend on such worldly factors like what happens in
my current project - which is totally unrelated to curl but pays the food on
my table) and of course your help can advance the progress and speed up the
forthcoming introduction of these features. Like testing, bugfixing and
evaluating the latest hiper patch.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2006-01-26