| |
|
|
|
cURL Mailing List Monthly Index Single Mail
curl-library Mailing List Archives
grokking 10000 multi connections
From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Wed, 16 Feb 2005 00:13:01 +0100 (CET)
Hi
I read all the mails in the threads talking about the updated multi API, and
The new public API for the multi interface is being designed to allow libcurl
curl_multi_sockset() - Sets a callback that gets called... eh, when there's
curl_mulit_sockupd() - Request an update of the socket (file descriptor)
curl_multi_sockperf() - A new version of curl_multi_perform() that allows
In an appplication that uses 10000 simultaneous transfers, it would do
----------- pseudo code example app ---------------
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
/* Wait for action, on libcurl's sockets and on our own set of things.
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
}
---------------- end of example --------------------
--
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
These mail archives are generated by hypermail. |
Page updated November 12, 2010.
web site info