curl-library
Re: Pulling Multi Urls At Once
Date: Tue, 06 Jul 2010 22:15:35 -0600
Thank you very much after pulling my hair out of my head for over 3
months that solved it. Thank god!
On Tue, 2010-07-06 at 21:57 -0500, Jeff Pohlmeyer wrote:
> 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
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-07-07