Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想获取 Windows 在给定时间点接收的打开 HTTP(TCP 端口 80)连接的总数。
.NET 中有什么方法可以得到这个吗?
我需要以某种方式查询IPGlobalProperties.GetActiveTcpConnections吗?
为我工作:
var properties = IPGlobalProperties.GetIPGlobalProperties(); var httpConnections = (from connection in properties.GetActiveTcpConnections() where connection.LocalEndPoint.Port == 80 select connection);