2

I am sending data from a UDP socket to a multicast address. UDP sender socket has the port number 5555 and the address 192.168.0.1 and the multicast has the address 239.192.255.1 and port number 5555. I am able to send the data to the multicast address. But I am not having any success in implementing a receiver socket to receive the data from the multicast. As far as I'm aware, the receiver socket should be bound to the same port number as the multicast, but because the sender socket also shares that port number, I'm unable bind the receiver socket. Is there a different way to receive the multicast data without changing the network parameters?

I am able to receive the data if the multicast port number is different from the sender port number because I could set a receiver port with a unique port number.

Benjamin Buch
  • 4,752
  • 7
  • 28
  • 51
Solu
  • 29
  • 3
  • the sender doesn't need to bind to that port number – user253751 Mar 28 '23 at 15:43
  • We can't tell you what's wrong with your code if you don't show it. Please update your question with a [mcve] that others can compile and run to see the same results you do. – dbush May 12 '23 at 01:47

0 Answers0