I've read through Glenn Fiedler's awesome guide on Reliability over UDP and I'm currently working on my own implementation for fun and learning purposes.
One pretty cool piece of Glenn's guide is that it implements redundant acks as a bitset: when a packet is acking a message, it includes a bitset indicating which of the previous 32 sequence numbers were also acked by flipping that particular bit to 1.
However, one issue I'm running into is what to do when packets are dropped at the beginning of the bitset, e.g. the 32nd bit is not acked.
Let's say my message header is the following:
Ack: 42
Bitset: ack everything from 10 to 41, but _not_ SequenceNumber 9!
// or even Bitset: nothing previously acked
In this scenario, I cannot begin processing SequenceNumber 43 and beyond from the remote client otherwise I would have data loss for acking SequenceNumber 9.
Do I just stall and not process any further SequenceNumbers until I receive SequenceNumber 9? This should ideally be rare, but I worry that stalling everything may not be the correct solution and there's another possible solution.