相关疑难解决方法(0)

在C#中,如何检查TCP端口是否可用?

在C#中使用TcpClient的或一般连接到插座我怎么能先检查如果某个端口是免费在我的机器上?

更多信息: 这是我使用的代码:

TcpClient c;
//I want to check here if port is free.
c = new TcpClient(ip, port);
Run Code Online (Sandbox Code Playgroud)

.net c# tcp tcpclient

116
推荐指数
9
解决办法
19万
查看次数

标签 统计

.net ×1

c# ×1

tcp ×1

tcpclient ×1