0

While trying to read data from a TCP socket using ReceiveAsync.Completed, I experience a few ms delay (1-5ms, once in a while) between the time the data arrives to my application and the time it arrives to the machine. I use Wireshark to compare the timestamps, PSH bit is turned on for those messages as well and the application is not busy or blocking anything. What am I missing ? Thanks.

1 Answers1

0

With such a small delay it could come from anywhere, the garbage collector kicking in could delay you that much easily.

Wireshark isn't operating on the same level as your application. It could be that it's getting the data at different times than you just because the system is supplying it a little faster. Or maybe their times are off. Maybe your times are off. With such a small difference its hard to tell.

I bet you're not doing anything wrong.

William Morrison
  • 10,953
  • 2
  • 31
  • 48
  • 1
    Or maybe your application is not scheduled immediately after Wireshark, this could be less than one quantum delay. – user1937198 Jul 31 '13 at 13:12