string sMulticastAddress = "239.255.255.250";
UdpClient uc = new UdpClient();
uc.JoinMulticastGroup(IPAddress.Parse(sMulticastAddress));
IPEndPoint iep = new IPEndPoint(IPAddress.Parse(sMulticastAddress), 3702);
byte[] abFoo = Encoding.ASCII.GetBytes("This is a test");
for (int i= 0; i < 100; i++)
{
uc.Send(abFoo, abFoo.Length, iep);
}
The above code runs, but it does not seem to send out anything based on the trace of Wireshark. However, if I change sMulticastAddress to any other address such as 239.255.255.251, 239.255.255.248, 239.255.255.249, it works perfectly. Wireshark captures every packet("This is a test") sent by it. I do not know what makes 239.255.255.250 so special. I am testing it on Windows 10. I have tried turning off Firewall. This is a UWP app. I have another UWP app that uses DatagramSocket to multicast to the same address on the same computer, and it works. This means the problem is probably related to UdpClient. I am wondering if anyone could offer a tip on the possible causes.