Hi,
I have to connect to many machines defined in IP addresses ranges at startup.
In these ranges, it is possible that some IP addresses does not exist or some machines are not started so I Ping (using System.Net.NetworkInformation.Ping) each IP address before trying to connect to it to prevent big Tcp timeout.
It seems that, whatever timeout I specified < 500 ms, a Ping timeout is always at least 500 ms !
As I have to ping a lot of machines, I would like to specify a timeout of about 100 or 200 ms.
To avoid too many threads, I send the ping sequentially in 1 dedicated thread.
Thanks in advance,
Droopy.

Ping timeout < 500 ms
Sam Loud
Thanks a lot for your help.
rohit nagesh
The second argument is the timeout.
If I use 100 or 200 as second argument, the timeout is usually 500 ms, sometimes 400 ms.
Is is a bug or do I miss something
I agree 100 or 200 could be too small as timeout though I get an average 20 ms through a VPN access.
Thanks a lot for your help.
Droopy.
KoryS
Have you tried overloaded, Ping.Send() or Ping.Async() which takes second argument as TimeOut But i think if you are working on internet this much small Timeout will not let you get correct results or even it may cause you problem in Local Intranet... So you have to wait a bit more to get it completed and proceed to next IP/Host Name. I think you should leave it as default because i dont think there must be no delay in its working as soon as it gets the result, it give them back to you without waiting for external factor to interact....
Best Regards,
Rizwan
Chandresh
Yes the ping / ICMP has a minimum of 500 milliseconds timeout or something |
similar. So you can't use really small timeout values