C# 用Socket怎么得到请求客户端的IP地址??
时间:2020-06-21 22:05:39
收藏:0
阅读:237
C# 用Socket怎么得到请求客户端的IP地址??
绑定连接的Socket中有个属性可取远程计算机IP
Socket newSocket = socket.Accept();
IPEndPoint clientipe = (IPEndPoint)newSocket.RemoteEndPoint;
Console.WriteLine("[" + clientipe.Address.ToString() + "] Connected");
原文:https://www.cnblogs.com/zkwarrior/p/13173989.html
评论(0)