Hello,
if an IP address is not reachable then TCPConnect lasts about 21 seconds for me the return with the error. Now I wrote a function using my socket_UDF to set a timeout if the IP address cannot be reached.
Have fun.
_TCPConnectTimeout example
#include "socket_UDF.au3"
Global $iTimerStart, $iSock
Global $TestIP = "1.2.3.4"
Global $TestPort = 800
Global $ConnectionTimeout = 1000
_WSAStartup()
Global $iTimerStart = TimerInit()
$iSock = _TCPConnectTimeout($TestIP, $TestPort, $ConnectionT