Unix Socket Programming Question:

Download Job Interview Questions and Answers PDF

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

Unix Socket Programming Interview Question
Unix Socket Programming Interview Question

Answer:

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.

Download Unix Socket Programming Interview Questions And Answers PDF

Previous QuestionNext Question
How can I read ICMP errors from connected UDP sockets?How come only the first part of my datagram is getting through?