winsock connect() and how to reduce intial timeout value from, 3 seconds to 1 second or less
-
If possible what is the easiest way to reduce the connect inital timeout value from 3 seconds to 1 second or less? The excerpt below reduced the retries which is not good enough for my purposes. Any suggestions would be appreciated. Thanks "Now, the initial timeout value - before the first connection attempt - is 3 seconds. After each retry, the amount of time to wait is doubled (3 seconds, 6 seconds etc.). The number of retries can be configured via the 'TcpMaxConnectRetransmissions' parameter in the registry - the default is set to 3 for Windows NT and 2 for Windows 2000. Thus, the first solution to the connection timeout problem is, to adjust this parameter via the Registry. However, changing the registry is a global change, affecting all applications that use Winsock and/or TCP/IP. The following Knowledge Base article (http://support.microsoft.com/default.aspx?scid=kb;en-us;120642) provides detailed information. Nevertheless, one should be careful while playing with these parameters."
-
If possible what is the easiest way to reduce the connect inital timeout value from 3 seconds to 1 second or less? The excerpt below reduced the retries which is not good enough for my purposes. Any suggestions would be appreciated. Thanks "Now, the initial timeout value - before the first connection attempt - is 3 seconds. After each retry, the amount of time to wait is doubled (3 seconds, 6 seconds etc.). The number of retries can be configured via the 'TcpMaxConnectRetransmissions' parameter in the registry - the default is set to 3 for Windows NT and 2 for Windows 2000. Thus, the first solution to the connection timeout problem is, to adjust this parameter via the Registry. However, changing the registry is a global change, affecting all applications that use Winsock and/or TCP/IP. The following Knowledge Base article (http://support.microsoft.com/default.aspx?scid=kb;en-us;120642) provides detailed information. Nevertheless, one should be careful while playing with these parameters."
Alan Kurlansky wrote:
what is the easiest way to reduce the connect inital timeout value from 3 seconds to 1 second or less
There is no 3 second timeout for connect() function. You need to implement your own timeout mechanism or use a socket library that does. It's a short answer, hope it helps. :) /M