curl-library
Re: ftp download resume sample code?
Date: Fri, 5 Nov 2010 19:12:16 -0400
On Fri, Nov 5, 2010 at 6:56 PM, John Utz <John.Utz_at_dmx.com> wrote:
> I prefer hacking the struct to adding a global, but i am worried that
> libcurl might be expecting the WRITEDATA struct to be of fixed size and this
> would not be the same size as the stuff in all of the examples.
>
> Am I ok with doing this?
You can pass a pointer to just about anything you want using WRITEDATA
that makes sense for your own callback. Personally, I have never used
the structure in the examples. Feel free to create any structure that
holds all data that you require in order to properly handle the data
in the callback as it comes in. As far as libcurl is concerned, it
does not care one bit what that pointer represent, it just passes it
along (unless you use the default callback function, of course).
Lars Nilsson
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-11-06