EldoS | Feel safer!

Software components for data protection, secure storage and transfer

TElSimpleSSHClient.Open() timeout?

Also by EldoS: Callback File System
Create virtual file systems and disks, expose and manage remote data as if they were files on the local disk.
#7755
Posted: 09/30/2008 09:10:49
by Aaron Gibbs (Standard support level)
Joined: 09/30/2008
Posts: 4

Hello,

First off great product, been using it successfully in trial mode for a month now, definitely will be purchasing it.

We're connecting to roughly 1,000 sites remotely via SSH each evening, 10 or so at a time in a multi-threaded application. Some of the sites have really poor internet connections, in which case we revert back to a modem connection and dial the sites using another component. These sites are mostly SCO Unix boxes, some are running variations of Linux as well.

We test each site for TCPIP connectivity using PING first before attempting to connect via SSH. If the PING is successful, we attempt an SSH connection, otherwise, we go straight to dialup.

Some sites will respond to PING but will not connect via SSH. The problem with SecureBlackBox is that it doesn't seem to timeout for a LONG time while attempting to connect to these sites. . . I call the TElSimpleSSHClient.Open() method and it will hang for 10+ minutes attempting to connect, and I will have to manually abort the thread to force it to give up. Is there any way to set a connect timeout parameter so it will only try for XX seconds before it gives up on a connect attempt?

Thanks for your help!
#7756
Posted: 09/30/2008 09:14:39
by Ken Ivanov (EldoS Corp.)

Thank you for contacting us.

Please consider using SocketTimeout property to specify the needed timeout value in milliseconds. The Open() method will throw an exception if there is no response from remote side for the specified timeout value.
#7757
Posted: 09/30/2008 09:19:10
by Aaron Gibbs (Standard support level)
Joined: 09/30/2008
Posts: 4

Thank you for the quick response! I will try this right away.
#13979
Posted: 07/21/2010 12:19:01
by Paul Pidoprygora (Standard support level)
Joined: 12/01/2008
Posts: 6

I encountered the same problem with TElSimpleSFTPClient and just wanted to confirm that setting SocketTimeout will have effect only on connection time out and will have no negative impact on download/upload operations. Can Eldos please confirm this? Thank you!
#13981
Posted: 07/21/2010 12:33:38
by Eugene Mayevski (EldoS Corp.)

SocketTimeout specifies, how long the component should wait for response after initiating socket connection or sending the data request. If timeout elapses and no connection/response is given, timeout exception is thrown. Timeout itself can't have any impact on transfer speed.


Sincerely yours
Eugene Mayevski
#13984
Posted: 07/21/2010 14:02:32
by Paul Pidoprygora (Standard support level)
Joined: 12/01/2008
Posts: 6

Thanks, Eugene!
So, if I define a SocketTimeout value of 60000, then an exception will be thrown when any command issued by TElSimpleSTPClient does not get server's response within 1 minute (e.g. Connect, OpenDirectory, ReadDirectory, etc). This being said, DownloadFile/UploadFile are not affected, because during these operations there is data going back and forth, hence exception will not be triggered. Am I right?
#13985
Posted: 07/21/2010 14:28:57
by Eugene Mayevski (EldoS Corp.)

Upload and download also involve sending packets and receiving responses from the server. If no response comes within a minute, exception will be thrown.


Sincerely yours
Eugene Mayevski
#13986
Posted: 07/21/2010 14:50:08
by Paul Pidoprygora (Standard support level)
Joined: 12/01/2008
Posts: 6

Thank you Eugene! However, if the file being uploaded/downloaded will take more than 1 minute to upload/download due to bandwidth limitations, will this trigger an exception?

What I am trying to achieve is to avoid my threads hang in a multi-threaded service only when Connect/List operations take longer than a minute.
Also by EldoS: Solid File System
A virtual file system that offers a feature-rich storage for application documents and data with built-in compression and encryption.

Reply

Statistics

Topic viewed 4420 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!