C2DS message sequence numbers

Hi Matthew,

Development Request for C2DS: can a message sequence number be added to each message sent by C2DS in response to a request? The sequence number will increment by one for each request/response during a session.

For the EstablishStatus / Checkin function, if for any reason a message does not reach my client code, then it would be useful to know that when I send another checkin request, whether the next checkin response is the one I missed, or the next one after that.

I.e., I may have missed a checkin response because a) my request never reached C2, or b) C2’s checkin response never reached me, and C2 thinks it did; therefore C2’s next checkin will leave a gap in the deltas I receive.

If it turns out that C2 thinks it sent me the message, my code will then have to run another ‘EstablishStatus’ to get a new baseline before starting to request deltas again.

Another way to do this is to add a ‘re-request’ function to Checkin, where a client can ‘gap-fill’ by sending the sequence numbers it missed.