cURL / Mailing Lists / curl-library / Single Mail


Re: Multiple Calls to Curl to do Multiple Downloads with each Call

From: Daniel Stenberg <>
Date: Fri, 21 Feb 2014 22:15:40 +0100 (CET)

On Fri, 21 Feb 2014, Phil Welch wrote:

> So, before I move in that direction I thought I'd ask if there's any example
> code where Curl is called multiple times [and] processes an array of url
> downloads during each iteration.  Again, 1 at a time is not a problem; many
> at a time is.

With the multi interface you just add handles, any number of handles, and they
will all be handled in parallel. There's really no difference between adding
one handle or 999 handles for an application.

Seen in this simple example:

Or this rather advanced multi_socket API example: (using libevent, but there are
also several ones using other event libraries)


List admin:
Received on 2014-02-21