Re: [twsocket] FTP Client - Large files

2012-11-27 Thread Graham Powell
More clues.

1:
Tried the xferdemo3 and that works ok.

2:
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.

3:
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.

Graham

-Original Message-
From: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] On
Behalf Of Angus Robertson - Magenta Systems Ltd
Sent: 26 November 2012 18:31
To: twsocket@elists.org
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. 

Angus

--
To unsubscribe or change your settings for TWSocket mailing list please goto
http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] FTP Client - Large files

2012-11-27 Thread Angus Robertson - Magenta Systems Ltd
 My code is basically a state machine. In the FtpRequestDone event, 
 it decides what to do next. 

I used a similar state machine in another application, but prefer the
sync calls for complex applications, and then use a thread per transfer.
TMagFtp has been tested with 200 simultaneous downloads. 

You do have to be very careful not to call the message pump from within
RequestDone or things can get very confused.  Do not call any sync
methods that will call the message pump, ie only call CwdAsync not Cwd. 

 So the question is: What are you doing in your demo that is 
 different.

Using sync methods with WaitUntilReady which loops calling the message
pump until State is ftpReady or ftpInternalReady, rather than expecting
the FtpRequestDone event to be called. 

It is possible there is a strange component bug and the state is being
changed without FtpRequestDone being called.  My component does not use
FtpRequestDone atall.  

You could try checking the StateChange event as well to see if that is
called when your transfer finishes, or just check the State property in
the fail safe timer I assume you have running to handle errors and stop
the application waiting for days. 

 Wireshark shows you are doing ALLO

Not sure why you using Wireshark, the FTP component has all the events
you need to log the FTP protocol, even without the logger component.  

Angus

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] FTP Client - Large files

2012-11-27 Thread Arno Garrels
Angus Robertson - Magenta Systems Ltd wrote:
 Not sure why you using Wireshark, the FTP component has all the events
 you need to log the FTP protocol, even without the logger component.

I think he uses Wireshark because, and that makes sense, he wants 
to know whether or not the server response to the PUT request is actually
received. From how I read OP's messages the response to the PUT request
is sometimes and sometimes not included in the Wireshark logs, which is 
at least strange.

-- 
Arno 
   
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be