NET FTP Library
KiloBytePerSecThrottle Property
Example 






KellermanSoftware.NetFtpLibrary Namespace > FTP Class : KiloBytePerSecThrottle Property
This is the maximum number of KB/Sec of bandwidth that the FTP component will use If zero, it will transfer at top speed.
Syntax
'Declaration
 
Public Property KiloBytePerSecThrottle As System.Decimal
'Usage
 
Dim instance As FTP
Dim value As System.Decimal
 
instance.KiloBytePerSecThrottle = value
 
value = instance.KiloBytePerSecThrottle
public System.decimal KiloBytePerSecThrottle {get; set;}
public read-write property KiloBytePerSecThrottle: System.Currency; 
public function get,set KiloBytePerSecThrottle : System.decimal
public: __property System.decimal get_KiloBytePerSecThrottle();
public: __property void set_KiloBytePerSecThrottle( 
   System.decimal value
);
public:
property System.decimal KiloBytePerSecThrottle {
   System.decimal get();
   void set (    System.decimal value);
}
Example
FTP ftp = new FTP(); //Trial Mode            
//FTP ftp = new FTP("place user name here", "place license key here");
 
// set the name of the FTP server( its URL )
ftp.HostAddress = "ftp.fsz.bme.hu"; // a hungarian university. change this to your ftp server
ftp.UserName = "anonymous"; // replace with your user name
ftp.Password = "user@mail.com"; // replace with your password
 
// This is the maximum number of KB/Sec of bandwidth that the FTP component will use 
// If zero, it will transfer at top speed 
ftp.KiloBytePerSecThrottle = new Decimal(19.5m);
 
ftp.UploadDirectoryAsync("C:\\Download", "TestDir");
 
//we wait 1 second for data to be Transferred 
System.Threading.Thread.Sleep(1000);
 
System.Console.WriteLine("Current bandwidth allocation for the ftp transfer is {0}(KBS)", ftp.KiloBytePerSecThrottle);
Dim ftp As FTP = New FTP() 'Trial Mode
'FTP ftp = new FTP("place user name here", "place license key here");
 
' set the name of the FTP server( its URL )
ftp.HostAddress = "ftp.fsz.bme.hu" ' a hungarian university. change this to your ftp server
ftp.UserName = "anonymous" ' replace with your user name
ftp.Password = "user@mail.com" ' replace with your password
 
' This is the maximum number of KB/Sec of bandwidth that the FTP component will use 
' If zero, it will transfer at top speed 
ftp.KiloBytePerSecThrottle = New Decimal(19.5D)
 
ftp.UploadDirectoryAsync("C:\\Download", "TestDir")
 
'we wait 1 second for data to be Transferred 
System.Threading.Thread.Sleep(1000)
 
System.Console.WriteLine("Current bandwidth allocation for the ftp transfer is {0}(KBS)", ftp.KiloBytePerSecThrottle)
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

FTP Class
FTP Members