NET FTP Library
ReadWriteTimeout Property
Example 






KellermanSoftware.NetFtpLibrary Namespace > FTP Class : ReadWriteTimeout Property
Gets/Sets the timeout in milliseconds when reading/writing to a local file stream or network stream. The default is to wait 30000 (30 seconds).
Syntax
'Declaration
 
Public Property ReadWriteTimeout As System.Integer
'Usage
 
Dim instance As FTP
Dim value As System.Integer
 
instance.ReadWriteTimeout = value
 
value = instance.ReadWriteTimeout
public System.int ReadWriteTimeout {get; set;}
public read-write property ReadWriteTimeout: System.Integer; 
public function get,set ReadWriteTimeout : System.int
public: __property System.int get_ReadWriteTimeout();
public: __property void set_ReadWriteTimeout( 
   System.int value
);
public:
property System.int ReadWriteTimeout {
   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.ReadWriteTimeout = 30000; //30 seconds
 
//Gets/Sets the timeout when reading/writing to a stream 
System.Console.WriteLine("The FTP component will trigger an exception if reading/writing from/to a stream takes more than {0} milliseconds", ftp.ReadWriteTimeout);
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.ReadWriteTimeout = 30000 '30 seconds
 
'Gets/Sets the timeout when reading/writing to a stream 
System.Console.WriteLine("The FTP component will trigger an exception if reading/writing from/to a stream takes more than {0} milliseconds", ftp.ReadWriteTimeout)
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