【发布时间】:2012-01-08 23:51:05
【问题描述】:
我正在尝试使用本地端口 50177 向特定端点发送和接收数据。发送数据非常好,但是当程序尝试接收数据时它无法接收任何数据。当我用 Wireshark 嗅探网络时,我看到服务器向我发送了数据。我知道我不能在一个端口上同时拥有 2 个 UdpClient。
谁能帮帮我?
UdpClient udpClient2 = new UdpClient(50177);
IPEndPoint Ip2 = new IPEndPoint(IPAddress.Parse("255.255.255.255"), 1005);
udpClient2.Send(peerto255, peerto255.Length, Ip2);
IPEndPoint Ip = new IPEndPoint(IPAddress.Parse("10.10.240.1"), 1005);
var dgram = udpClient2.Receive(ref Ip);
【问题讨论】: