Then you have to carefully build a protocol on top of UDP. You need to be careful to include all the relevant information that will need to be used to contextualize the information that's received in a datagram. At the very least this means a datagram number, so that you can determine which one was sent the most recently, since they might arrive out of order.