每个应用程序中的互联网使用情况
我想问我如何获得某些应用程序(如流媒体等)使用的互联网流量。我想用 C# 制作一个程序,但我不知道如何启动它....给一些建议谢谢
i would like to ask how can i get the internet amount that being used by some application like streaming and etc. i would like to make a program using in C# and i don't how can i start it.... give some advice thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
作为起点,我会查看 WinSock API。您可能会找到一种在每个进程的基础上提取流量信息的方法。
如果您想查看总网络使用情况,我会使用性能监控工具。我从 网络搜索< /a>:
As a starting point I'd look at the WinSock API. You may find a way of pulling traffic information on a per process basis.
If you want to see total network usage, I'd use the Performance Monitoring tools. I found this example from a web search:
据我所知,不存在测量每个应用程序的网络带宽的标准方法。使用标准方法可以获得的最多结果基本上就是
netstat
和perfmon
显示的内容。计算每个应用程序指标的唯一方法是编写 NDIS 筛选器驱动程序,或使用现有的筛选器驱动程序(例如 WinPcap)。但这两种方法都必须在每台目标计算机上安装驱动程序。To the best of my knowledge, there exists no standard method to measure network bandwidth per-application. The most you can get with standard means is essentially what
netstat
andperfmon
show. The only way to calculate per-application metrics is to write an NDIS filter driver, or use an existing filter driver such as WinPcap. But both ways you'll have to install a driver on every target machine.试试这个:如何在c#中计算网络带宽速度
编辑
现在我更好地理解了这个问题,尝试看看这个其他SO问题
Try this: How to calculate network bandwidth speed in c#
EDIT
Now that I understand the question better try looking at this other SO question