Sergey Moshkov
Sergey Moshkov

Reputation: 491

Sending one long ping (with big waiting timeout) vs sending multiple short pings

Is there any difference between sending one long ping (with big waiting timeout) and sending multiple short pings (with short waiting timeout)?

I am writing in C# and using Ping.Send / Ping.SendAsync methods for sending pings but guess it is general question.

EDIT

I understand that sending ping to some addresses can take a long time and the comparison is not very clear. What I am really interested in is can the result of sending long ping be false and the disjunction of results of sending multiple short pings be true?

Upvotes: 1

Views: 352

Answers (1)

Sebastian Negraszus
Sebastian Negraszus

Reputation: 12205

Well, imagine that for a given server it takes 1s for the ping response to arrive. If you send one ping with a long timeout of 2s, you will get a response. But if you send 20 pings with a short timeout of 0.1s, you will not get any response, but 20 timeouts.

Edit:

can the result of sending long ping be false and the disjunction of results of sending multiple short pings be true?

Yes. A ping is not 100% reliable, e.g. there may be packet loss or the server may be under heavy load and delay/ignore the request.

Upvotes: 1

Related Questions