curl-library
AW: Need help: stuck on upload speed of 4kb/s using libcurl 7.51.0
Date: Mon, 21 Nov 2016 23:56:22 +0000
Thanks a lot, that worked!
I copied that from the examples I found, feel a bit dumb now for not trying that.
Greetings,
Sebastian
________________________________________
Von: curl-library [curl-library-bounces_at_cool.haxx.se]" im Auftrag von "Daniel Stenberg [daniel_at_haxx.se]
Gesendet: Montag, 21. November 2016 23:05
An: libcurl development
Betreff: Re: Need help: stuck on upload speed of 4kb/s using libcurl 7.51.0
On Mon, 21 Nov 2016, Sebastian Christ wrote:
> size_t ScSpeed4Trade_cURL::UploadCallback(char *ptr, size_t size, size_t
> nmemb, void *data)
...
> MEMCPY (ptr, Quelldaten->DatenPtr, size);
Counter this with a quote from the man page for CURLOPT_READFUNCTION:
"The data area pointed at by the pointer buffer should be filled up with at
most size multiplied with nmemb number of bytes by your function."
size multiplied with nmemb. You copy just 'size' bytes, which happens to be 1
as a fixed value here, so you copy one byte at a time.
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.html ------------------------------------------------------------------- List admin: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.htmlReceived on 2016-11-22