I'm testing how our software handles connection failures. We use socket.BeginConnect
with a callback function set. The endpoint IP address and/or port number is deliberately invalid. The callback function gets called after ~21s every time (with timeout and connection failure, of course). I'd like to be able to tweak 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\TcpInitialRTT
looks helpful. But I've tried the values 1, 2, 3 and 22 and the timeout does not change from ~21s. The computer was rebooted after each change.
Can the timeout for TCP/IP socket connections be tweaked at OS level? Using C# and .NET Compact Framework.
You must do so using
then wait on the