NET FTP Library
RetryTimeout Property
Example 






KellermanSoftware.NetFtpLibrary Namespace > FTP 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 Overridable Property RetryTimeout As System.Integer
'Usage
 
Dim instance As FTP
Dim value As System.Integer
 
instance.RetryTimeout = value
 
value = instance.RetryTimeout
public virtual System.int RetryTimeout {get; set;}
public read-write property RetryTimeout: System.Integer; virtual; 
public function get,set RetryTimeout : System.int
public: __property virtual System.int get_RetryTimeout();
public: __property virtual void set_RetryTimeout( 
   System.int value
);
public:
virtual property System.int RetryTimeout {
   System.int get();
   void set (    System.int 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
 
ftp.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", ftp.RetryTimeout);
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
 
ftp.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", ftp.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

FTP Class
FTP Members