AbidingDude
Programmer
I'm just beginning to learn libcurl. I'm a little confused on the callback function parts - both for CURLOP_WRITEFUNCTION and CURLOPT_READFUNCTION.
The help file (for READFUNCTION) says:
"...The data area pointed at by the pointer buffer should be filled up with at most size multiplied with nitems number of bytes by your function. size is always 1."
It almost makes it sound like I have to provide 'buffer' and 'nitems', but it seems like I never call the function directly. It's passed to other libcurl functions, so libcurl provides these parameters?
I understand that I would have to write a function to handle where we are in the data stream, but it sounds like I don't have to establish a buffer or buffer size?
The help file (for READFUNCTION) says:
"...The data area pointed at by the pointer buffer should be filled up with at most size multiplied with nitems number of bytes by your function. size is always 1."
It almost makes it sound like I have to provide 'buffer' and 'nitems', but it seems like I never call the function directly. It's passed to other libcurl functions, so libcurl provides these parameters?
I understand that I would have to write a function to handle where we are in the data stream, but it sounds like I don't have to establish a buffer or buffer size?