0

I created this proof of concept code to exercise my understanding of how Socket.Send behaves.

The host im pointing to is actually on Australia Central azure datacenter (and im in Brazil, so its half-world distance) and yet the avg TICK is between 40 and 70. And im not talking milliseconds, TICKS!

Can anyone explain to me what is going on?

I was expecting to have the avg milliseconds close to 200 or something... but right now its not even close to 1ms!

Leonardo
  • 10,737
  • 10
  • 62
  • 155
  • do you honestly believe that a round trip across the world takes less than 1ms?!? If my measurements are wrong, pls point it out! the code is there! copy, paste and execute if you don't believe me – Leonardo Oct 30 '20 at 18:55
  • Socket send returns as soon as data was sent, when it returns it doesn't mean that data was actually received by the other end, so there is no roundtrip. – Evk Oct 30 '20 at 19:31

1 Answers1

2

From the docs:

[...] A successful completion of the Send method means that the underlying system has had room to buffer your data for a network send.

So there's no guarantee that the data has actually reached the destination once the Send method returns.

Xerillio
  • 4,855
  • 1
  • 17
  • 28