cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: keeping connection on multi_remove_handle for FTP

From: Armel Asselin <asselin.armel_at_wanadoo.fr>
Date: Thu, 14 Dec 2006 20:09:41 +0100

(I put just one question in the middle)

>>> I guess what I'm trying to say is: this problem is somewhat more
>>> complicated than at least I previously were thinking.
>
>> I'm trying to find a definitive solution to that. In fact there two cases
>> at hand, either the buffer was sent totally, or it was not.
>
> Correct. But there's also the a response that we might be waiting for more
> data for, or we don't.
>
>> If it was sent totally, we can definitely go on with a ABOR command
>
> Not really. First we also need to know that we also have received the
> whole response to that previous command.
>
>> [only necessary if a data connection was there or to be opened]
>
> This whole precudure is only required if you intend to use the connection
> again.
>
>> If it was sent partially, we have no other choice than finishing current
>> buffer, else the server may get a truncated command which actually means
>> something else. then we can proceed with the above case.
>
> if(outstanding send)
> complete the send
>
> if(not whole response received yet)
> receive the full response

what do you mean by full response? full response text from control
connection?

> if(data connection in use) {
> send ABOR
>
> receive ABOR response
>
> close data connection and free associated resources
> }
>
> ftp control connection ready for re-use

Armel
Received on 2006-12-14