How can I be sure that UDP messages are received in order?



How can I be sure that UDP messages are received in order?..

Answer / chaitanya

You can't. What you can do is make sure that messages are processed in order by using a numbering system as mentioned in ``5.5 How can I be sure that a UDP message is received?''. If you need your messages to be received and be received in order you should really consider switching to TCP. It is unlikely that you will be able to do a better job implementing this sort of protocol than the TCP people already have, without a significant investment of time.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Unix Socket Programming Interview Questions

Whats the difference between select() and poll()?

0 Answers  


How is a socket created?

0 Answers  


What is the difference between close() and shutdown()?

1 Answers  


What is a sae socket?

0 Answers  


How can I listen on more than one port at a time?

1 Answers  






If bind() fails, what should I do with the socket descriptor?

1 Answers  


What is the difference between connected and unconnected sockets?

1 Answers  


What is the difference between read() and recv()?

0 Answers  


How to find other end of unix socket connection?

0 Answers  


Why do we need sockets?

0 Answers  


over the socket? Is there a way to have a dynamic buffer? What does one do when one does not know how much information is coming?

1 Answers  


Why do I keep getting EINTR from the socket calls?

1 Answers  


Categories