作者Killertcell (老马)
看板C_Sharp
标题Re: 请问如何控制网路卡的关闭或启动
时间Sat Dec 18 23:21:16 2004
※ 引述《ithinkurdumb (Let's Go YANKEES!)》之铭言:
: Windows NT里面有个utility叫做Performance,
: 它可以监看local或是network上电脑的各种performance counter,
: 当然包括了network performance.
: 因此我的想法是直接用它来监看network performance.
: 实际上的做法大概是这样.
: 1. 在Toolbox -> Component里面有一个PerformanceCounter, 用drag-n-drop
: 把它加入到window / web form里头.
: 2. 在那个PerformanceCounter的properties里面, 选择你要监看的种类.
: 这边就假设是要监看某个网路介面的流出流量.
: Category Name选Network Interface,
: CounterName选Bytes Sent / sec,
: InstanceName选要监看的那个网路介面.
: 如果要监看网路上的其他电脑的performance, 就在MachineName那儿指定.
: 3. 用PerformanceCounter.NextValue这个method来读取calculated value,
: 用PerformanceCounter.RawValue这个property来读写raw value.
: 简单来讲就是这样,
: 细节看看.NET Framework SDK吧.
: Performance功能是狠强大的,
: 之前看过有个tutorial用ASP.NET做了个web based的Performance Counter.
谢谢ithinkurdumb大大的回答,
那再请问.. 如何控制对外网路的启动和关闭呢?
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 220.134.83.229