c# socket 判断端口是否被占用

时间:2015-06-08 17:03:20   收藏:0   阅读:1058
using System.Net;
using System.Net.Sockets;
using System.Net.NetworkInformation;

            IPGlobalProperties ipProperties = IPGlobalProperties.GetIPGlobalProperties();
            IPEndPoint[] ipEndPoints = ipProperties.GetActiveTcpListeners();
            foreach (var item in ipEndPoints)
            {

            }

 

原文:http://www.cnblogs.com/bingguang/p/4560993.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!