Back to product page

MaxTransferRate property


Determines maximum allowed upload/download speed.

Type

Long integer.

Syntax

  • C#
  • VB.NET
Int64 MaxTransferRate {get; set; };

Property MaxTransferRate As Int64

Remarks

MaxTransferRate defines how much maximum bandwidth wodSFTP.NET can use. It is presented as 'bytes per second', both for upload and download. When set to 0 (default value), there is no bandwidth limit.

If you plan to use this property, you should set it to any value prior to starting file transfer. After that you can change this property at any time, and wodSFTP.NET will be affected immediately. If you calculate current speed, you could do that from the Progress event. If you want to restrict speed for, for example, only downloads, you can set MaxTransferRate property just before calling GetFile. Same applies for PutFile as well. To get correct kilobytes and megabytes per second values, you should multiply desired bps rate with 1024 or 1024^2, not 1000.

Your calculated bps values may have up to 10% difference than your MaxTransferRate setting.

Platforms

Windows