Under normal circumstances, what should I expect the worse case scenario to be for out of order UDP packets?
I'm currently tagging each packet with two bytes (a 0 to 65535 number) to keep track of the order. Is this enough or too much?
Under normal circumstances, what should I expect the worse case scenario to be for out of order UDP packets?
I'm currently tagging each packet with two bytes (a 0 to 65535 number) to keep track of the order. Is this enough or too much?
According to the RFC 3208 you can target the last two packets being out of order.
Worst case would by definition be unlimited and such you are better off treating a third out of sequence packet as data loss.
In all cases, receivers SHOULD temper the initiation of NAK generation to account for simple mis-ordering introduced by the network. A possible mechanism to achieve this is to assume loss only after the reception of N packets with sequence numbers higher than those of the (assumed) lost packets. A possible value for N is 2. This method SHOULD be complemented with a timeout based mechanism that handles the loss of the last packet before a pause in the transmission of the data stream.
It should be plenty, I have never seen more then 3-4 out of order UDP packets, you could get away with a single byte to track it.