NET SFTP Library
RetryTimeout Property
Example 






KellermanSoftware.NetSFtpLibrary Namespace > SFTP Class : RetryTimeout Property
Retry timeout in milliseconds if a network connection drops. The default is to wait 5 minutes if the network drops and then retry an upload or download from the last byte position. If no retry is desired set to -1.
Syntax
'Declaration
 
Public Property RetryTimeout As System.Integer
'Usage
 
Dim instance As SFTP
Dim value As System.Integer
 
instance.RetryTimeout = value
 
value = instance.RetryTimeout
public System.int RetryTimeout {get; set;}
public read-write property RetryTimeout: System.Integer; 
public function get,set RetryTimeout : System.int
public: __property System.int get_RetryTimeout();
public: __property void set_RetryTimeout( 
   System.int value
);
public:
property System.int RetryTimeout {
   System.int get();
   void set (    System.int 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
 
sftp.RetryTimeout = 300000; //5 minutes
 
//Gets/Sets the time to wait to retry when the network connection drops
System.Console.WriteLine("The FTP component will retry a download if the network connection drops for {0} milliseconds", sftp.RetryTimeout);
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
 
sftp.RetryTimeout = 300000 '5 minutes
 
'Gets/Sets the time to wait to retry when the network connection drops
System.Console.WriteLine("The FTP component will retry a download if the network connection drops for {0} milliseconds", sftp.RetryTimeout)
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