Re: [twsocket] Overbyte ICS FTP upload with progress bar
I've writen an FTP client that previously used OnFtpProgress, and can confirm that it's called a tremendous amount of times, and in my case caused my client application to hit 100% CPU as a result. The way I've implemented it in the past is to create another FTP Client class derived from ICS FTPClient, with an added timer which is turned on at the start of the transfer, and off at the end of the transfer, and every time the timer is fired (at intervals of say, 1000 ms), it updates the progress bar. Hope that helps with an efficient implementation. Lester On 22/02/2015 15:27, Angus Robertson - Magenta Systems Ltd wrote: procedure TForm2.FtpProgress(Sender: TObject; Count: Int64; var Abort: Boolean); begin ProgressBar.Position := Count; end; Correct concept, but you also need to set the ProgressBar Min and Max properties to indicate how much progress has been made. The FTP event simply returns a count of the number of bytes transferred, which might be zero to several billion, so Min should be set to zero and Max to the size of the file being uploaded, before the upload starts. Harder for downloads where you need to know the size of the file first. Also, this event will typically be called dozens of times per second on a fast internet connection, and updating the screen is time consuming so can slow down the transfer speed, and the change may be invisible. So you generally put more intelligence in the progress function to update no more than once every one or more seconds or when there is a substantial change, like 1 to 5%. 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] ICS FTP server and clients in active mode
In passive mode, the client connects to the server to establish the TCP session on which the data is being transferred. In active mode, the server connects to the client in order to establish the TCP session for the data channel. The best place to look for the problem is from the client - enable some kind of verbose logging, and compare the actions between your FTP server, and a known working one. Here is an example of an active file transfer using FileZilla. Command:TYPE A Response:200 Type set to A Command:PORT 10,110,177,71,215,131 Response:200 Port command successful Command:STOR log.txt Response:150 Opening data channel for file transfer. Response:226 Transfer OK In this example, my client has told the server to connect to my IP address of 10.110.177.71 on port 55171. When I issue the command STOR log.txt, my client waits for the server to establish the TCP connection before the client sends the data to the server, and then the client will close the connection, making the server reply with a 226 Transfer OK. If you are still unable to find out what the problem is, you may want to install Wireshark so you can see the network traffic on the wire, and ascertain where the problem lies. You should be aware however that PORT mode (i.e. Non Passive) won't necessarily work well from Clients behind NAT routers. I've documented how you can get an FTP Server to support both Active and Passive transfers in my Experts Exchange article, visible here: http://www.experts-exchange.com/Software/Server_Software/File_Servers/FTP/A_7833-Make-your-FTP-Server-support-Active-and-Passive.html Hope this helps. On 23/01/2014 09:05, Marcin Bury wrote: Hi all I have an application that acts as a ftp server. It works great when ftp clients use passive mode. But when some ftp client tries to send a file in active mode, no file is written, but what is worst - server respondes that transfer was completed succesfully. Can someone give me some clue where to start looking for the reasons of such behavior or what other tests I should perform I'm using ICS V8 from mid December. Thanks in advance Marcin -- 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] Mails not reaching destination...
You're going to need to log the SMTP communication to determine if the mail message is being accepted or rejected. Once you know this, then you can take it up with your SMTP provider who can potentially trace the mail for you. If it's being rejected, it usually tells you the reason why. Just remember that Gmail now automatically sorts e-mails in your inbox, so it may not show up in your default view - check all the different folders available to you. Lester On 23/10/2013 20:07, Erik Brännlund wrote: Hi! I have a very old version of ICS and D5. Anyway if I send an email to my gmail account it doesn't show up and it doesn't bounce back either. Have someone seen any such trouble before and knows what might be the cause of this. The mail sender is domain a.com and the SMTP server is domain b.com can this be the reason. /Erik -- 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