MULTICAST address and port, socket listen only on port?
I've notice something that I found strange, so if somebody could explain it to me it would be wonderful.
I make an application on GNU/Linux which listening on a MULTICAST stream, so I open my unconnected socket, bind it on a MULTICAST address and a port, join the multicast group with the "setsockopt (IP_ADD_MEMBERSHIP)", then I receive datagram on my socket.
Now I've two different instances of the same application that run with their own MULTICAST address and port. And what I found strange is that, after a misconfiguration, I switch the ports, for example:
Emitting on 184.108.40.206/23451 and 220.127.116.11/23452
Receiving on 18.104.22.168/23452 and 22.214.171.124/23451
And my receiving part doesn't care about the MULTICAST address, it looks like the socket is listening on the port number only! I mean that the receiver [126.96.36.199/23452] take its datagrams from emitter [188.8.131.52/23452] and vice-versa!
I'll try other tests to investigate it but does anybody can explain that thing to me?