Concurrent multicast udp socket

emmanuel.richiardone at gmail.com emmanuel.richiardone at gmail.com
Tue Apr 9 06:56:37 EDT 2013


Dear all

I have a problem with multicast sockets of the same port but belonging to different groups.

For example, I have two udp sockets, listening on the same local address and same port; for each one I set the sockopt to listen on a specific multicast group (I can also see the igmp packets going out of the interface).

But when data is sent on the network to one multicast address, I receive the same data to both the socket; I understand why, because I set the SO_REUSEPORT option.

I'm looking for a way to identify to which multicast group the data was sent after have been received on each socket.

I'm working on debian, python version 2.7 or 3.3.1.
Here is a sample of code:
 http://pastebin.com/BF1gkvgg

Thanks for helps..

--
Emmanuel (http://richiardone.eu)



More information about the Python-list mailing list