I'm uploading information to a server using a post call (using curlpp, but libcurl directly is fine too).
CURLOPT_PROGRESSFUNCTION callback gets called from time to time with reports on how much data was send until now. When I upload a file, I see this call being made with very small delta between calls.
I want to get a callback BEFORE each part of data is sent, with the information of how much data is going to be transmitted now.
You might use the callback to be set by passing
CURLOPT_READFUNCTIONtocurl_easy_setopt().This assumes that the amount of data to be read by this callback function will be the size of the next chunk to be sent.
For details please see here: http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTREADFUNCTION