Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
3.1k views
in .NET FTP by (1.9k points)
Hi,

A requirements that is seemingly becoming essential for FTP client applications is controlling the speed of uploads/downloads. Especially with remote sites over slow WAN/VPN connections. When we use our application it eats up all the bandwidth of the remote site preventing other users on the link to efficiently use it. Before posting my suggestion for a new feature request to edtFTPnet, I searched previous posts feeling that I will sure find an answer. I was amazed to see this post http://www.enterprisedt.com/forums/viewtopic.php?t=551&highlight=speed almost three years ago with no working solution. I feel that this is becoming a very important requirement and will add to the already existing amazing features that edtFTPnet provides. I hope to hear from you soon with that regards.

Thanks

3 Answers

0 votes
by (162k points)
Actually nowadays it is almost trivially easy to implement.

There is a BytesTransferred event, so all you need to do is implement that event and slow down the transfer in whatever way you wish. Because this is so flexible and easy to do, we're not sure that explicitly adding a method to slow a transfer down is worthwhile.
0 votes
by (1.9k points)
Hi again,

Could you please post an example of how this can be done. As far as I understand, BytesTransferred event tells me the transfer rate per second. I am happy to hear that it is easy to implement now, but cold you please post any sample codes showing how it can be done? Say I want to upload to a maximum of 50Kbps!!

Appreciate your assistance..

PS: My applications throws all the files to be sent to a queue which quickly opens up a connection per server per file.
0 votes
by (162k points)
The BytesTransferred event tells you how many bytes have been transferred so far. So all you need to do is record the previous time it was called and how many bytes had been transferred, and compare to the current. This will tell you the transfer rate. If it is too high, sleep for a while.

Categories

...