3.1.1.2.2 Receiver Window Buffer

The Receiver Window Buffer is a circular buffer implemented by the Receiver. The circular buffer is of size 1<<(LogWindowSize field in the RDP-UDP2 Packet Header) (see section 2.2.1.1). It contains an active range of nodes each representing a packet that was either received or expected to be received, and whose acknowledgment has not been sent to the Sender yet. Each node in the active range has one of two possible states.

Received: The packet has been received.

Pending: The packet is expected but has not been received. A packet would be in this state if a packet with a higher sequence number was received.

The upper bound of the active range in the circular buffer increases when a packet is received with a sequence number that is higher than all nodes in the active range. The upper bound is advanced to contain the received packet and all packets that have sequence numbers between the highest sequence number in the active range and the received packet. The entry corresponding to the upper bound is marked as "Received" and all remaining newly added entries are marked as "Pending".

The lower bound of the circular buffer is increased when either of these events occur.

  • An acknowledgment is sent with one or more sequence numbers marked as received. The lower bound of the circular buffer is set to the next node in the circular buffer. Note that if the acknowledgment is performed using an Acknowledgement Vector payload, the lower bound can advance only if the first sequence number in the list describing the acknowledgement states is in the "Received" state.

  • An AckOfAcks payload is received from the Sender containing a sequence number which is to be set as the new lower bound of the buffer.