Receiving UDP multicast message in C# application

  • Thread starter Thread starter pkuebler
  • Start date Start date
P

pkuebler

Guest
Hi there,

I'm actually struggling with a problem considering network multicasts in C#. To be honest I'm not that expert in multicasts. My problem is. I do have a device on the network who is sending multicast messages on a regular basis. I now wan't my C# application to be capable to receive those messages. However, I didn't get it manage. Here is a snippet of one of the multicast telegrams from the sending device:

1355673.png

As you can see the messages are being sent to 224.168.100.2 - coming from address 169.254.2.0. I've tried several implementations in C# (and C++). I used approaches with UDPClient as well as with Socket. I also did a test run with the sample code given in here: https://docs.microsoft.com/en-us/dotnet/api/system.net.sockets.multicastoption?view=netframework-4.7.2 But, as mentioned, no luck so far. Of course I also shut down my firewall. Furthermore I tried several IGMPVersion settings within HKLM:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters]
"IGMPVersion"=dword:00000003

Nothing helped. I am able to send messages onto the multicast address. However reception isn't working for some reason. If I'm right then a sending application does not need to join a multicast group, right?

One additional thing. I'm trying to receive the multicast messages on my secondary network interface card. That's why I used to bind my listening application to the network address of my secondary network interface card before the multicast membership is being pronounced.

Any hints are welcome. Thanks in advance.

Best regards,
Peter

Continue reading...
 
Back
Top