Indigo Rose Software
  #1  
Old 11-22-2008
Veiron's Avatar
Veiron Veiron is offline
Forum Member
 
Join Date: Aug 2007
Location: Russia, Obninsk
Posts: 14
TestConnection

Hi,

I put "Timeout = 5", and it all the same scans 20 seconds. For the sake of interest has put "Timeout = 30", the same 20 seconds.

It is necessary to scan fast 10 addresses, 200 seconds it it is a lot of.

What to do?
Reply With Quote
  #2  
Old 11-22-2008
jassing's Avatar
jassing jassing is offline
Indigo Rose Customer
 
Join Date: Jan 2001
Location: Anderson Island, WA, USA
Posts: 1,899
Quote:
Originally Posted by Veiron View Post
Hi,

I put "Timeout = 5", and it all the same scans 20 seconds. For the sake of interest has put "Timeout = 30", the same 20 seconds.

It is necessary to scan fast 10 addresses, 200 seconds it it is a lot of.

What to do?
post your actual code.
__________________
Reply With Quote
  #3  
Old 11-23-2008
Veiron's Avatar
Veiron Veiron is offline
Forum Member
 
Join Date: Aug 2007
Location: Russia, Obninsk
Posts: 14
PHP Code:
HTTP.TestConnection("http://192.168.0.1"20); 
Connecting 20 seconds, ok.

PHP Code:
HTTP.TestConnection("http://192.168.0.1"3); 
Connecting 20 seconds…

PHP Code:
HTTP.TestConnection("http://192.168.0.1"60); 
Connecting 20 seconds…

PHP Code:
    if HTTP.TestConnection("http://192.168.0.1"3then
    ServerIP 
"192.168.0.1";
    elseif 
HTTP.TestConnection("http://192.168.0.2"3then
    ServerIP 
"192.168.0.2";
    elseif 
HTTP.TestConnection("http://192.168.0.3"3then
    ServerIP 
"192.168.0.3";
    
end 
If all not correct to wait 1 minute.
Reply With Quote
  #4  
Old 11-24-2008
Veiron's Avatar
Veiron Veiron is offline
Forum Member
 
Join Date: Aug 2007
Location: Russia, Obninsk
Posts: 14
Thus it is necessary to scan 10-15 IP addresses.
20 seconds for each, 200-300 seconds of all - too long.
Reply With Quote
  #5  
Old 11-24-2008
Ulrich's Avatar
Ulrich Ulrich is offline
Indigo Rose Staff Member
 
Join Date: Apr 2005
Location: Sao Paulo, Brazil
Posts: 823
Hello,

this was recently confirmed as a bug and is currently being looked into.

Ulrich
__________________
Reply With Quote
  #6  
Old 11-24-2008
Veiron's Avatar
Veiron Veiron is offline
Forum Member
 
Join Date: Aug 2007
Location: Russia, Obninsk
Posts: 14
Thanks, I will hope for fast correction.
Reply With Quote
  #7  
Old 11-24-2008
Ulrich's Avatar
Ulrich Ulrich is offline
Indigo Rose Staff Member
 
Join Date: Apr 2005
Location: Sao Paulo, Brazil
Posts: 823
Quote:
Originally Posted by Veiron View Post
Thanks, I will hope for fast correction.
I doubt it very much. What needs to be corrected is the documentation, as timeouts can only be set while sending or receiving data through sockets, not for the connection.

There is no way to control directly the timeout for establishing a new connection: The mechanism and timings are coded into the TCP/IP stack of the operating system, and although you might tinker with the values in the registry (for example TcpMaxConnectRetransmissions), it wouldn't be advised as it would affect the whole computer. There are no means to alter these values directly, or to control how the TCP/IP protocol should behave for a single application.

In simple words, it works like this: When you try to establish a connection, the initial timeout for the operation is 3 seconds. If the connection fails (the socket gets no ACK answer to its SYN packet sent), the connection is restarted, doubling the initial timeout. If this connection fails again, a third attempt is made, doubling the timeout once again. Here you see why it takes about 20 seconds to get a negative to your connection attempt: 3 + 6 + 12 = 21 seconds. This is simply how the TCP/IP protocol works, and no application can work its way around this... What could be done is to place each connection attempt into a separate thread, and start monitoring the time of each thread created. When the allowed time is reached, the thread should have to be forcefully terminated... but this isn't something IR would be able to provide soon.

I hope that clears the issue a bit.

Ulrich
__________________

Last edited by Ulrich; 11-24-2008 at 03:16 PM.
Reply With Quote
  #8  
Old 11-24-2008
Veiron's Avatar
Veiron Veiron is offline
Forum Member
 
Join Date: Aug 2007
Location: Russia, Obninsk
Posts: 14
I experimented in due course and put different numbers from -5 to 1 million, as a result of 20 seconds exactly (on hours Windows). In the Help it is written, that this parametre is responsible "The maximum time in seconds that the action will wait for a response after attempting to connect.". Otherwise it should be realised in a Delphi application which will make it much faster, but it is less convenient, to that after Ping should start installation.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -6. The time now is 12:48 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright © 2000 - 2009 Indigo Rose Corporation. All rights reserved.
Indigo Rose Software