Hi,
I am very new with Delphi and wrote a simple program to check if 5 servers are active over a VPN connection. I am using the Indy TidIcmpClient to simply "ping" the host and check the ms reply time.
To improve on this, I used the BeginThread to check all 5 servers at the same time. The problem that I have is that on my one computer it works fine and I get the status (4 servers up, 1 down), but on my other computer when running the same application at the same time, it is asif all the servers reply at exactly the same speed, and all 5 are up (when I know for a fact that 1 server is down). Both my computers are running Windows 7 64-bit.
EDIT: After adding some code to investigate, I noticed that the host IP address of my threads is correct, but all the MS reply times are exactly the same, asif its using 1 reply for all the diffrent threads. Like I said, I am very new to this, and I used 5 different ICMPClient objects each with its unique name, 1 per thread that I am starting.
EDIT2: I added - label1.Caption := 'IP: ' + pingServer1.Host + ' : ' + pingServer1.ReplyStatus.Fr
omIpAddres
s; -
From what I can see is it takes the fastest reply from the 5 servers and uses that for all the threads. So even if my pingServer1.Host := '172.20.100.10' (that I know isnt running), the IP from pingServer1.ReplyStatus.Fr
omIpAddres
s is 172.20.100.5 (that is active) and all the other servers that is also active, gives the same FromIpAddress IP (172.20.100.5) even thou I change the Host of each server.
EDIT3: I am using Delphi 2009.