4.2 Flow Control and Receive Windows Example

This example demonstrates how flow control and receive windows work on the abstract level between a sender and a recipient on a channel instance A with fictitious numbers.

 Action

 Sender local available window

 Bytes sent

 Recipient local available window

 Bytes received

Initial state where the receiver on channel A has successfully advertised a receive window of 1,000 bytes but no RPC PDUs have been sent on channel A.

1,000

0

1,000

0

The sender sends 250 bytes of data to the recipient on channel A and decrements its local available receive window for channel A by the amount of data sent. The sender also increments its total bytes sent by the number of bytes sent.

750

250

1,000

0

The recipient receives the 250 bytes of data on channel A but does not release it from the receive window yet. The recipient decrements its local available receive window for channel A by the number of bytes received. The recipient also increments its total bytes received by the number of bytes received.

750

250

750

250

The recipient releases 100 bytes of data from the receive window for channel A and increments its local available receive window by the number of bytes removed. The recipient sends a flow control acknowledgment back to the sender on channel A with 250 for the BytesReceived and 850 for the AvailableWindow.

750

250

850

250

Before the flow control acknowledgment is received by the sender, the sender sends another 500 bytes of data to the recipient on channel A and decrements its local available receive window for channel A by the amount of data sent. The sender also increments its total bytes sent by the number of bytes sent.

250

750

850

250

The sender receives the flow control acknowledgment packet and updates its local available receive window for channel A with the following formula:

AvailableWindow = AvailableWindow_from_ack - (BytesSent - BytesReceived_from_ack)

In this example, the formula expands to:

850 - (750 - 250) = 350

350

750

850

250

The recipient receives the 500 bytes of data on channel A, but does not release it from the receive window yet. The recipient decrements its local available receive window for channel A by the number of bytes received.

350

750

350

750

The recipient releases 200 bytes of data from the receive buffer for channel A and increments its local available receive window by the number of bytes removed. The recipient sends a flow control acknowledgment back to the sender on channel A with 750 for the BytesReceived and 550 for the AvailableWindow.

350

750

550

750

The sender receives the second flow control acknowledgment and updates its local available receive window for channel A with the following formula:

550 - (750 - 750) = 550

550

750

550

750

The recipient releases the remaining 550 bytes of data from the receive window for channel A and increments its local available receive window by the number of bytes removed. The recipient sends a flow control acknowledgment packet back to the server on channel A with 750 for the BytesReceived and 1,000 for the AvailableWindow.

550

750

1,000

750

The sender receives the third flow control acknowledgment and updates its local available receive window for channel A with the following formula:

1,000 - (750 - 750) = 1000

1,000

750

1,000

750