我需要做以下事情:
1. Find the current network bandwidth.
2. Limit the bandwidth to download the file by 50%.
我对此进行了一些研究,但我找不到任何好的方法。
就像通过发送一些数据一段时间并对其进行一些算术来计算带宽一样。
我想知道是否有更好的方法?因为这将花费额外的时间(发送和接收数据+计算带宽)。每次收到下载请求时,我都不想一次又一次地这样做。
我需要做以下事情:
1. Find the current network bandwidth.
2. Limit the bandwidth to download the file by 50%.
我对此进行了一些研究,但我找不到任何好的方法。
就像通过发送一些数据一段时间并对其进行一些算术来计算带宽一样。
我想知道是否有更好的方法?因为这将花费额外的时间(发送和接收数据+计算带宽)。每次收到下载请求时,我都不想一次又一次地这样做。