On Fri, Aug 02, 2024 at 06:10:38PM +0000, Jeff Mears via curl-library wrote:
> In a program using curl_multi_socket_action in a select/poll loop, what is
> curl_multi_perform supposed to be used for?  I’ve been simply not calling it,
> and things seem to work, but doing this seems incorrect somehow.

The multi interface provides two different ways of running the transfer loop: 
curl_multi_perform and curl_multi_socket_action. The application only needs to
call one of them for libcurl to do its thing. Which one is the best to call
depends on the architecture of the application.  curl_multi_perform is easier
to use and is typically used with select or poll while curl_multi_socket_action
is often used in an event-based application (based around something like
libevent) and allows higher performance with many open handles. Many other
curl_multi_* functions only make sense to call in conjunction with only one of
these two.

The page https://curl.se/libcurl/c/libcurl-multi.html#MULTISOCKET goes into
some more detail on the two approaches.

Dan
-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html

Reply via email to