The present invention extends to methods, systems, and computer program
products for controlling the transfer of terminal server data. In some
embodiments, contending request to send terminal server data are resolved
by a flow control module situated between a terminal server protocol and
a transport/network protocol. The flow control module utilizes channel
priorities along with amounts of previously sent data per channel to
determine how to distribute bandwidth in a relatively controlled manner
between contending channels. The flow control module can be configured to
intercept communication between terminal server protocol and a
transport/network protocol to facilitate bandwidth distribution. In other
embodiments, data is simultaneously sent over multiple channels of
terminal server connection. A first write operation obtains a lock on a
corresponding channel but the channel lock does not prevent write
operations on other channels.