I would like to test Receive of multicast messages using UDP Client
I have two network adapters.
Network 1: with local IP : 10.239.1.1 [Multicast Group : 224.1.1.1 : 42333]
Network 2 : with local IP : 172.4.1.1 [Multicast Group : 224.0.1.1 : 42333]
Note : I can see all the multicast on wire shark
In my program I created and joined the multicast group as bellow.
_LocalUDPClient = new UdpClient(new IPEndPoint(_localIpAddress, _multiCastPort));
_LocalUDPClient.Client.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, true);
_LocalUDPClient.JoinMulticastGroup(_multicastIpAddress, _localIpAddress);
_LocalUDPClient.BeginReceive(new AsyncCallback(ReceiveCallBack), null);
Network 1 :
_localIpAddress = 10.239.1.1
_multicastIpAddress = 224.1.1.1
_multiCastPort = 42333
I receive multicast message successfully.
BUT Network 2 :
_localIpAddress = 172.4.1.1
_multicastIpAddress = 224.0.1.1
_multiCastPort = 42333
Not receiving any Multicast data.