【发布时间】:2015-02-05 09:05:41
【问题描述】:
我第一次尝试实现一个套接字应用程序。 当我使用:
IPHostEntry ipHostInfo = Dns.Resolve(Dns.GetHostName());
IPAddress ipAddress = ipHostInfo.AddressList[0];
IPEndPoint localEndPoint = new IPEndPoint(ipAddress, 11000);
localEndPoint IPEndPoint 包含“192.168.56.1”,这是我在 VirtualBox 网络下的地址。 它应该包含我的本地网络 IP(“192.168.1.165”)。
我该如何管理它?
我查看了谷歌,但我能找到答案对不起......
【问题讨论】: