Because multicasting is a one to many communication, there maybe some occasions when you would like multiple UdpClient instances on the same machine to receive data from the same multicast group and port. To do this, you would need to set the SO_REUSEADDR socket option before joining the multicast group. Here are some sample codes that do the job:
UdpClient client =
Socket s = client.Client;
s.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, 1);
IPEndPoint iep =
retVal = client.Receive(
Anthony Wong [MSFT]
This posting is provided "AS IS" with no warranties, and confers no rights.