Hi there, I've made a little tool to easily "ping" a TCP port called PingPort but I have a bug or I'm doing something wrong. You can download it (sources are included) using this link. An easy way to understand my issue is to run pingport google.com:80 If you are connected then disconnect the cable or WiFi while pinging it will continue pinging successfully !?! I don't understand why TCPConnect does not fail. Am I missing something here ? Here is a piece of code : TCPCloseSocket($socket)
$timer = TimerInit()
$socket = TCPConnect($server_ip, $protocol_port)
If $socket = -1 OR @error Then
ConsoleWrite($server_name & " is DOWN on port " & $protocol_port & GetErrorDescription(@error) & @CRLF)
Else
ConsoleWrite($server_name & " is UP on port " & $protocol_port & " - latency : " & HumanTime(TimerDiff($timer)) & @CRLF)
EndIf
Sleep(1000)
WEnd
TCPCloseSocket($socket) Thank you for your help and time.