| Dart Home | PowerTCP FTP for ActiveX | Custom Development | Reply | PowerTCP FTP for ActiveX Topics | Forums |
| Author | Forum: PowerTCP FTP for ActiveX Topic: How do I know what command has been sent out? |
| raymng From: HK, USA Posts: 28 Member Since: 03/08/03 |
posted November 12, 2003 9:25 AM Dear Sir, For example, when "Ftp1.List" method is run, it will actually send out two FTP commands to the server: - PASV or PORT - LIST But how can I know what commands has just been sent out for each method programmatically? Thank you. Raymond |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted November 12, 2003 9:34 AM They should trigger progess events. |
| raymng From: HK, USA Posts: 28 Member Since: 03/08/03 |
posted November 12, 2003 9:45 AM But how can I know exactly what command has been sent out? |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted November 12, 2003 9:49 AM In the case of the command method, you'd have to figure it out from the reply that the server gave you. For other commands, it's one of the parameters passed into the event. |
| raymng From: HK, USA Posts: 28 Member Since: 03/08/03 |
posted November 14, 2003 1:57 AM Yes, I found that the "FtpCmd" parameter will be passed to the "Progress" event. But how can I know before the server reply me? Suppose the server doesn't reply me, I have no way to know what command has been sent out? Is it possible to find the sent FTP command through the DartStream object? Thanks. Raymond |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted November 14, 2003 8:50 AM Save the command to a global variable called "LastCommand". When you call the command method, set it. When replies come, clear it. |
| raymng From: HK, USA Posts: 28 Member Since: 03/08/03 |
posted November 14, 2003 9:05 AM No, I am not that mean. For example, when "Ftp1.List" method is run, it will actually send out two FTP commands to the server: 1. PASV or PORT 2. LIST How can I get the sent command to the variable in my program? |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted November 14, 2003 9:57 AM I just put the following in the Progress event: Debug.Print ftpCommand, Status during the execution of a list I get: 9 1 27 1 27 0 When you 9 and 1 ( PORT and Working) you can assume that the PORT is done. The only time PORT or PASV is sent is by us and it is an intermediate command so it will always have a status of working or failed. |
| Reply | PowerTCP FTP for ActiveX Topics | Forums |
This site is powered by
PowerTCP WebServer for ActiveX
|