A method and system for directing data transfers between applications and devices
residing on different computers or devices using an adaptive flow control protocol
has been described. When an application or device requests to transfer data with
another application or device, the adaptive flow control protocol adapts the way
data is transferred by observing when an application that is receiving data posts
a receive buffer and detects the receive buffer's size. Based upon the application's
or device's behavior, the adaptive flow control protocol transfers the data in
a mode that is best suited for the application. A credit-based sequencing method
is used to coordinate message transfers.