3.1.5.10 Send Sequence ID (bSeq) Validation and Processing

The TRANS_USERDATA_HEADER bSeq field MUST be either the next sequence ID expected or within 63 packets beyond the ID expected by the receiver. If the sequence ID is not within this range, the payload MUST be ignored. In addition, a SACK packet SHOULD be sent indicating the expected sequence ID. If the PACKET_COMMAND_POLL flag is set in the bCommand field, this packet SHOULD be sent immediately; otherwise, the Delayed Acknowledgment Timer SHOULD be set using a short timeout, and a SACK packet SHOULD be sent when it expires. The recommended short timeout is 20 milliseconds. This value can be modified according to application and network requirements.

If the sequence ID is the next expected, the receiver SHOULD process the payload and advance the expected sequence ID. If the sequence ID is out of order, but still within 63 packets, the receiver SHOULD queue the payload until it receives either:

  • A delayed or retried transmission of the missing packet or packets, and can now process the sequence in order.

  • A subsequent packet with a send mask indicating that the missing packet or packets did not use PACKET_COMMAND_RELIABLE and will never be retried. Therefore, the receiver advances its sequence as if it had already received and processed the packets.

If an implementation has out-of-order packets beyond the current expected sequence ID queued, it SHOULD indicate this to the sender using appropriate SACK masks on any outgoing TRANS_COMMAND_SACK or TRANS_USERDATA_HEADER based messages. This feedback enables the sender to avoid retrying packets that have already been successfully received.