I would like to ping many different hosts simultaniously. Does .NET handle this concurrency for me, or must I implement this myself?
For example, the following object internally uses the Async version of ping:
Mypinger.Tracert("microsoft.com");
And I may have a different instance doing the same thing, but to a different host at the same time:
Mypinger.Tracert("google.com");
What prevents the concurrent Async methods from each instance interfering with each other?
What is the limit on the concurrency?
Yes. Use the Async variants of the various methods on the
Pingclass.Adapted from the examples in the Ping class documentation:
With regards to your edit and comment, although ICMP communication is typically stateless, ECHO messages (used in pings) maintain connection state, and so know what ping requests triggered a given response. There’s really no limit on concurrency, excluding connection swamping.