c# 获取端口的连接数,网站的连接数
2021-06-04 02:01
标签:format blog cps tmp where object poi tac active 端口连接数: 网站连接数: --------------------- 原文:https://blog.csdn.net/wyljz/article/details/79207507 c# 获取端口的连接数,网站的连接数 标签:format blog cps tmp where object poi tac active 原文地址:https://www.cnblogs.com/lonelyxmas/p/10878858.htmlpublic static int PortTcpConnection(int port)
{
IPGlobalProperties properti = IPGlobalProperties.GetIPGlobalProperties();
var tcps = properti.GetActiveTcpConnections().ToList();
var list = tcps.Where(f => f.LocalEndPoint.Port == port);
var iplist = list.GroupBy(f => f.RemoteEndPoint.Address);
return iplist.Count();
}
public List
版权声明:本文为博主原创文章,转载请附上博文链接!
文章标题:c# 获取端口的连接数,网站的连接数
文章链接:http://soscw.com/index.php/essay/90195.html