More clues.

Tried the xferdemo3 and that works ok.

My code is basically a state machine. In the FtpRequestDone event, it
decides what to do next. So after a CWD and a possible Mkdir commands it
does the putAsync. Nothing then happens until the next event which should be
a ftpPutAsync. However in the case of the large file and this particular FTP
site, no more events are generated.

If I change the "putAsync" to "Put",  (again from within the FtpRequestDone
event) the transfer is performed as before. Now at the end of the transfer
the code continues to the next line after the "Put" as you would expect.
Next, a ftpPutAsync event is generated with an error code of 426.

Wireshark is still not showing "226 File Transfer Complete".

Modified the xferdemo3 code by adding a FtpRequestDone event just to see
what and when it is called. This behaves as I expect and the ftpPutAsync is
generated at the end of the transfer. But I assume this is because the FTP
server has sent a "226 FTP Transfer Complete".

So the question is: What are you doing in your demo that is different.
Wireshark shows you are doing ALLO, but that just gets a response saying
it's unnecessary.


-----Original Message-----
From: [] On
Behalf Of Angus Robertson - Magenta Systems Ltd
Sent: 26 November 2012 18:31
Subject: Re: [twsocket] FTP Client - Large files

> My code just does putAsync and waits for the ftpPutAsync event.
> I don't know exactly how the xferdemo3w does it

You have all the source code for TMagFtp, so you can easily check.  There
are probably two main differences: 

1 - TMagFtp uses the sync FTP calls and WaitUntilReady, so check that
function for special handling.  

2 - The component has been developed and tested over several years and so is
very solid with a lot of special error handling to make it very stable.

One caution, xferdemo3w uses a 'special' widestring version of ICS v8 that
works with Delphi 2007, to use the unchanged ICS version test against
xferdemo3 which is pure ICS. 


To unsubscribe or change your settings for TWSocket mailing list please goto
Visit our website at

To unsubscribe or change your settings for TWSocket mailing list
please goto
Visit our website at

Reply via email to