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.