I have an application that needs to receive a variable number of packets in a block of data. I store them into a block-sized array with a packet-sized offset multiplied by the packet number.. I need to know when I've received all the packets, but out-of-order and duplicate packets are possible. I was thinking of doing this with a bit-field but that seems pretty messy. Are there other good ways to know when I've received all the packets, given that they may arrive out of order?
Message
Bit fields
2010-06-07 by David VanHorn