• Post Reply Bookmark Topic Watch Topic
  • New Topic

a delay in udp communication?

 
Elhanan Maayan
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi..
we have a strange problem,
we send a signal to a device in udp protocol which responds back to us .
according to wireshark the time interval between the signal being sent and the reply from the device is a few ms. however in our logs which are being printed right next to the UDP socket api the gap is like 2 seconds. which means something between wireshark and our application is delaying the traffic, is there a way i can check for it? (btw there's no high load on the cpu)
 
Henry Wong
author
Sheriff
Posts: 22526
109
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sometimes, UDP packets do get delayed (or delivered out of order)... but I agree, two seconds is a ridiculous amount of delay, and it is highly unlikely that the network, or the OS network stack will do it.

If I were to hunt down this issue, my gut would be to assume that the delay isn't happening, and it is something else that looks like it ... The standard "out of resources" action of UDP under load is to simply discard the packet. Perhaps the OS discarded the packet; and what you are seeing is a retransmission of the packet. Does the Wireshark show a third packet appearing later? ... Of course, if your protocol doesn't have retransmissions, then my guess is moot (and never mind).

Henry
 
Elhanan Maayan
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can this be shown in netstat or other commands?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!