skyline
skyline copied to clipboard
Handle sequence number wraparound
We use 32-bit unsigned integers to represent a message's sequence number. We assume that the sequence number increases monotonically. However when we reach 2^32-1, the next sequence number will be 0.
Given that we start at a sequence number of 0, it is unlikely for a user to hit 2^32-1 in a single session. However it would be a good idea to handle this wraparound for correctness.