0 votes
by (120 points)
edited

Hello, is it possible to set speedlimits for uploads / downloads? So a running file transfer does not use all available bandwidth but can be restricet to XX kbps?

Kind Regards Bjoern

Applies to: Rebex FTP/SSL

1 Answer

0 votes
by (13.0k points)
edited

To set speed limits use MaxDownloadSpeed and MaxUploadSpeed properties.

See example code:

Ftp ftp = new Ftp();
...

ftp.MaxUploadSpeed = 5; // limit upload bandwidth to 5 kilobytes per second
ftp.MaxDownloadSpeed = 5; // limit download bandwidth to 5 kilobytes per second

...
ftp.PutFile("file","file");

For unlimited speed set both properties back to zero.

...