I am using Delphi 11 FMX to write for Linux and Windows.
I have an auto-ping program working well on both platforms, using TIdIcmpClient
.
But now, I want to write a program that will ping up to four different IP addresses, displaying a flag when an address goes down. I could, of course, ping one IP and then change the IP and ping another. But I have seen that the first ping is always longer, although I have usually pinged in seconds of interval, once every 5 seconds, for example. The first ping is always much higher than the rest. So, in my program, I ignore the first ping.
I am afraid that if I use one TIdIcmpClient
, changing IPs before every ping, it will always be a first ping, and so will not represent the real round trip time. Or does this happen just the first time the TIdicmpClient
pings?
Alternately, perhaps I should use multiple TIdIcmpClient
components? But I don't know if it is okay to use multiple TIdIcmpClient
s. This program would ping each address perhaps once every 10 seconds at most, more likely once a minute.
I am looking for advice that will save me time when I write this program. I searched for this on StackOverflow, and elsewhere. I found some useful things here, but nothing this specific.