NET SFTP Library
ReadWriteTimeout Property
Example 






KellermanSoftware.NetSFtpLibrary Namespace > SFTP 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 SFTP
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
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.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", sftp.ReadWriteTimeout);
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.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", sftp.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

SFTP Class
SFTP Members