cURL / Mailing Lists / curl-library / Single Mail

curl-library

using data from a get to make a put?

From: Armel Asselin <asselin.armel_at_wanadoo.fr>
Date: Sun, 25 Jun 2006 18:17:26 +0200

Hello,

One of the operations that i would like to permit in my app would to put
into in FTP site a file that i just read from another FTP site.
In order to reduce the time for the operation, rather than doing RETR all of
the data then STOR aff all the data, I'd like to launch both operation in a
multi handle and use the read/write callback functions so that each time new
data come from write callback of RETR they are added to a queue and each
time read callback of STOR is called i read from there and returns the data
to put to Curl.
unfortunately i may encounter buffer underruns and it seems that read ( )
should never return 0, else than when indicating end-of-file (as per
curl_easy_set_opt doc, in 7.15.4 tar.gz).
is it right?
if yes, is it imagineable to have a return value such as
CURL_READFUNC_TRYLATER meaning that data is not yet here but it is expected
to and at next curl_multi_perform the data would be available and the work
would continue?

Armel
Received on 2006-06-25