cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: grokking 10000 multi connections

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Wed, 16 Feb 2005 14:13:01 +0100 (CET)

On Tue, 15 Feb 2005, Jamie Lokier wrote:

> Why do you have separate curl_multi_sockperf() and curl_multi_sockupd()
> functions?

Because I see them as two different beasts and because the current multi
interface works like that => 1. Figure out what to wait for. 2. wait. 3 act.
Loop.

It is a way to control exactly when the "socket state change" callback is
(needed to get) called, as otherwise it would be forced to get called in the
'act' part for numerous reasons whenever things in libcurl happen even if no
one intends to wait for an action on it.

But it might just be me who's stuck in that way of thinkning.

> Secondly, is it ok for the application to call curl_multi_sockperf() more
> than once in succession, to pass it actions a few at a time rather than
> causing a single potentially very long call?

That sounds like a very good idea.

I've tried to decide on the best way to provide this set of file descriptors
to the function, but I haven't really come up with any brilliant ideas.

You have a suggestion?

-- 
      Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
       Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2005-02-16