curl-library
Re: size_t write_function(...) not catching all data?
Date: Tue, 21 Jun 2005 16:27:56 +1000
Daniel,
Yes sorry about the double post, but i was told to post this list instead,
thanks for your help tho. In a nut shell the code listed below seems to be
doing the trick.
size_t write_function(char *bufptr, size_t size, size_t nmemb, void *data) {
int actualSize = size * nmemb;
return actualSize;
}
However now VC6 is giving me "User breakpoint called from code at 0x77f81b1"
which seems to occur when curl_easy_perform(curl) is called, any ideas anyone?
Thanks
leigh
Quoting Daniel Stenberg <daniel-curl_at_haxx.se>:
> On Tue, 21 Jun 2005, leighm_at_linuxbandwagon.com wrote:
>
>> Im doing a HTTP POST (upload) in curlPP with the following setup,
>> however write_function is only receiving about the first 50 bytes of
>> data. Also i noticed "size_t size" is always 1, even tho bufptr may
>> contain around 50 bytes of data?
>
> "The size of the data pointed to by ptr is size multiplied with nmemb"
>
>> What should write_function return?
>
> "Return the number of bytes actually taken care of."
>
>> Any ideas on where to check?
>
> http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTWRITEFUNCTION
>
> (and I already replied this to the curlpp list where you asked this
> in the first place...)
>
> --
> Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
>
>
-- What happened to Java version 2, 3 & 4? Why is Java 1.41 called Java2? What version is JRE 5? what happened to them? Where did they go? Why do i download Java1.x when im looking for Java2.0 ? And those java fellas reckon the PHP fellas are disorganised! ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.
- application/pgp-keys attachment: PGP Public Key