curl-library
Re: reading from ftp
Date: Sun, 14 Apr 2002 18:39:15 +0200 (MET DST)
On Sun, 14 Apr 2002, Nedelcho Stanev wrote:
> The problem is i think, that situation is no so simple.
I think you make it more complex that it needs to be.
> I have a module of apache/IIS extension.I get reqest, make some processing,
> after this i must process incoming file from web but by packets, i don't
> have file on disk, encode each packet make some processing and this packet
> to ftp, after this read next packet from www, and again send it to ftp
> after some processing.
This would be very easy using the multi interface.
> Download is similar to upload. So, for me the one solution is read/write to
> ftp packet by packet :(
... and that's what the multi interface offers.
> When i take a look on sorce i see that i can make this if i get sorce
> before calling of Transfer() and make something like
> curl_prepare_for_transfer(), get a piece of sorce from Curl_perform() until
> transfer, make new Transfer_chunk() function where i must copy sorce of
> Transfer() but without a while() and call this function until data can be
> read/write. And after this call curl_process_from_transfer() , where i copy
> sorce from Curl_perform()after res = Transfer(conn); may be this is not a
> best solution, but this will work for situation that i have.
You're of course free to do that. I just don't think it is the best solution.
I wish you the best of luck whatever solution you opt for!
-- Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/Received on 2002-04-14