我想获得Windows在给定时间点接收的打开HTTP(TCP端口80)连接的总数。
.NET中有什么办法可以获得这个吗?
我是否需要以某种方式查询IPGlobalProperties.GetActiveTcpConnections?
答案 0 :(得分:4)
适合我:
var properties = IPGlobalProperties.GetIPGlobalProperties();
var httpConnections = (from connection in properties.GetActiveTcpConnections()
where connection.LocalEndPoint.Port == 80
select connection);