I am testing how our software handles connection errors. We use socket.BeginConnectthe callback function with the function. The endpoint IP address and / or port number are intentionally invalid. The callback function is called after ~ 21 s each time (with a timeout and connection failure, of course). I would like to be able to adjust the timeout up or down for testing or final deployment.
According to this MSDN article for Windows CE 5.0, the key HKLM\Comm\Tcpip\Parms\TcpInitialRTTlooks useful. But I tried the values 1, 2, 3, and 22, and the timeout does not change from ~ 21. After each change, the computer rebooted.
Can I set a timeout for OS / TCP / IP socket connections? Using C # and the .NET Compact Framework.
source
share