Hi, You cant ensure that messages sent over UDP will arrive in the order they were sent in, however, you can add an int (order) to the message structure indicating the order of the sent message, then you can re-arrange these messages according to that number. To ensure that all messages arrive, implement a hand shaking mechanism. Something like: 1. Send a Message to the other end. 2. Mark it as "did not reach" i your program. 3. If the message reaches its destination, the destination sends an acknowledgment 4. After a predefined timout, if no acknowledment arrives, resend the message with the same order. Good luck