If you want to have multiple apps listen for the same UDP broadcast on a single computer, setting it up in .NET is a couple of extra lines of code. If you don't do this, it will only let the first app bind to this port/address.
Two key issues here:
- Set the option to ReuseAddress
- Bind to IPAddress.Any
string stringGroupAddress = "224.168.101.200";
IPAddress groupAddress = IPAddress.Parse(stringGroupAddress);
int groupPort = 1707;
UdpClient groupSocket = new UdpClient();
groupSocket.Client.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, true);
groupSocket.Client.Bind(new IPEndPoint(IPAddress.Any, groupPort));
groupSocket.JoinMulticastGroup(groupAddress);