cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: grokking 10000 multi connections

From: Jamie Lokier <jamie_at_shareable.org>
Date: Tue, 15 Feb 2005 23:56:41 +0000

Daniel Stenberg wrote:
> curl_multi_sockset(... set up to use our socket callback)
>
> while ( still_running ) {
>
> curl_multi_sockupd() /* get the callback called multiple times so that we
> know what to wait for */
>
> /* Wait for action, on libcurl's sockets and on our own set of things.
> This can use select(), poll() or whatever high-performance polling
> function your particular OS provides */
>
> wait( ); /* ... with a timeout */
>
> /* When the wait is done, either by an action or by a timeout
>
> curl_multi_sockperf(); /* this should pass on information to libcurl about
> what file descriptors that have "action" */
> }

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

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?

-- Jamie
Received on 2005-02-16