确定空闲网络传输带宽
我正在构建一个应用程序,该应用程序将移动一些可能很大的文件,但我希望在不通过淹没用户的网络连接的情况下做到这一点。我知道 Windows BITS 具有这种功能,这本质上就是我想要复制的功能(就限制而言)。我知道 BITS 还有其他我不感兴趣的功能,并且我还可以选择从 .NET 使用它,但我对它的工作原理感兴趣。
我在网上查了一下,除了模糊的“BITS 轮询活动以观察其他程序使用的带宽下降”之外,还没有找到关于 BITS 究竟如何确定要消耗多少带宽的明确解释。这意味着什么?其他程序消耗的带宽也可能由于许多其他原因而下降 - BITS 能区分出差异吗?如果我正在寻找一个复制这种“保持在雷达之下,用户不会注意到传输”功能的流程,我将如何去做呢?
更新:目前有许多程序可以执行此操作 - 最引人注目的是 Mozy 等自动备份程序。他们将仅使用可用的后台带宽,而不会减慢其他应用程序的速度。也许他们只是不断增加尝试的传输速率,直到实际传输速率停止增加,然后将其降低 10% 或其他。我很好奇是否有人尝试过类似的事情。
I'm building an application that will move around some potentially large files, but I want to do it without disturbing the user's network connection by flooding it. I know that Windows BITS has this kind of functionality, and that's essentially what I'm looking to replicate (as far as the throttling goes). I know BITS has other functionality as well that I'm not interested in, and I also have the option to consume it from .NET, but I'm interested in how it works.
I've looked online, and I haven't found a clear explanation of how exactly BITS determines how much bandwidth to consume, aside from a vague "BITS polls activity to watch for a drop in the bandwidth used by other programs." What does this mean? Bandwidth consumed by other programs can drop for a number of other reasons as well - can BITS tell the difference? If I was looking for a process that replicated this "stay just under the radar, where the user won't notice the transfers" functionality, how would I go about doing it?
UPDATE: There are a number of programs that currently do this - most notably, automatic backup programs like Mozy. They'll use just background bandwidth that's available, without slowing down other applications. Maybe they just keep increasing the transfer rate they're attempting until the real transfer rate stops increasing, and then it backs it down 10% or something. I'm curious if anybody has attempted something similar.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论