Speed limits

0 votes
asked Jul 26, 2011 by Bjoern (120 points)
edited Jul 26, 2011

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
answered Jul 26, 2011 by Martin Vobr (12,950 points)
edited Jul 26, 2011

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.

...