如何以编程方式限制我的C#应用程序的带宽使用? [英] How to programmatically limit bandwidth usage of my c# application?
问题描述
我这里有一个备份应用程序,该应用程序可以连接到各种Web服务并从ftp或http服务器下载/上传文件.限制应用程序带宽使用的最简单方法是什么?
I've got a backup application here which connects to various webservices and downloads/uploads files from ftp or http servers. What is the easiest way to limit the bandwidth usage of my application?
我需要这样做,因为一旦安装并运行该应用程序,将会降低所有办公室人员的互联网访问速度,最终将使我陷入困境.因此,我想实施一个限速功能,该限速功能在工作时间处于活动状态,而在晚上会被禁用.
I need to do that because the application once installed and running will be slowing down internet access for all office people, which eventually will get me into hell. So I'd like to implement a speed-limit which is active during the work-hours and gets disabled at night.
推荐答案
What you are looking for is called Bandwidth throttling And here is a good example how is this done, also review the comments to know how it is done from a client side.
您可能还想看看 此示例 ,也可以将其放入真实的应用程序中
You may also want to take a look at this example too, putting things in a real application
这篇关于如何以编程方式限制我的C#应用程序的带宽使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!