主权项 |
1. A method of managing bandwidth usage among a plurality of client devices, comprising:
receiving, by a first device from a second device, a request to transfer a first file between the first device and the second device; selecting, by the first device, a bandwidth policy associated with the second device, each bandwidth policy identifying a data transfer rate; adjusting, by the first device, the data transfer rate identified in the selected bandwidth policy based on a data transfer criterion of said second device at the first device; determining, by the first device, a first data transfer rate for transferring the first file between the first device and the second device, based on a transfer criterion of the second device at the first device; determining, by the first device, a first number of bytes to transfer between the first device and the second device during a first transfer period based on the determined first data transfer rate; receiving, by the first device from a third device, a request to transfer a second file between the first device and the third device; determining, by the first device, a second data transfer rate for transferring the second file between the first device and the third device, based on a transfer criterion of the third device at the first device; determining, by the first device, a second number of bytes to transfer between the first device and the third device during the first transfer period based on the determined second data transfer rate; sending, by the first device to the second device, a first response including the determined first number of bytes to transfer during the transfer period; and sending, by the first device to the third device, a second response including the determined second number of bytes to transfer during the transfer period. |