curl-library
Re: Need help: stuck on upload speed of 4kb/s using libcurl 7.51.0
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 21 Nov 2016 23:05:32 +0100 (CET)
Date: Mon, 21 Nov 2016 23:05:32 +0100 (CET)
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.htmlReceived on 2016-11-21