NET SFTP Library
KiloBytePerSecThrottle Property
Example 






KellermanSoftware.NetSFtpLibrary Namespace > SFTP 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 SFTP
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
SFTP sftp = new SFTP(); //Trial Mode            
//SFTP sftp = new SFTP("place user name here", "place license key here");
 
// set the name of the SSH server( its URL )
sftp.HostAddress = "some.sftp.server.com"; // replace with your SFTP server
sftp.UserName  = "anonymous"; // replace with your user name
sftp.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 
sftp.KiloBytePerSecThrottle = new Decimal(19.5m);
 
sftp.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)", sftp.KiloBytePerSecThrottle);
Dim sftp As SFTP = New SFTP() 'Trial Mode
'Dim sftp As SFTP = New SFTP("place user name here", "place license key here");
 
' set the name of the SSH server( its URL )
sftp.HostAddress = "some.sftp.server.com" ' replace with your SFTP server
sftp.UserName  = "anonymous" ' replace with your user name
sftp.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 
sftp.KiloBytePerSecThrottle = New Decimal(19.5D)
 
sftp.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)", sftp.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

SFTP Class
SFTP Members