Develop FTP client with Indy9_06
- Implementation method for ftp download speed limit
Roger yang
In order to achieve the FTP download speed limit function, it was originally found in INDYoHandlerthrottle. According to the function description of TidioHandlerthrottle "Implements An IOHandler Used TO RESTRICT THROUGHPUT TO A Targeted Number of Bytes Per Second.", It is said that the download speed is relying on it, but it is not so optimistic. Drag TidioHandlerthrottle onto the form, a few attributes are set, and it is quite simple. A big problem is discovered, performing a connection, reading file list, changing the transfer speed of FTP operations such as the directory, is restricted, and the transmission speed when downloading files is not limited. After that, I tried several ways. I didn't make TidioHandlerthrottle role to download files. Finally, only the SLEEP method is used in TIDFTP's ONWork events to implement speed limit function.