cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Pulling Multi Urls At Once

From: Jeff Pohlmeyer <yetanothergeek_at_gmail.com>
Date: Tue, 6 Jul 2010 21:57:33 -0500

On Tue, Jul 6, 2010 at 9:35 PM, Donald Boissonneault wrote:

> I can not get it to process more then one at a time of
> the html body because it calls a static function.

I would wrap your two globals into something like:

  typedef struct _WriteData {
    char* memory;
    size_t UrlConnectionHtmlBody_size;
  } WriteData;

Then create a separate instance of WriteData for each curl handle,
and pass it to your write callback, using CURLOPT_WRITEDATA.

You can then cast the void*stream from inside your callback back
into a WriteData*, and use that struct to store the page.

- Jeff
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-07-07