This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Duplicate packets in Multicast Receiver
Type: behavior Stage:
Components: Demos and Tools, Library (Lib) Versions: Python 3.1, Python 2.6
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: Aleksey Zhurbitsky, neologix
Priority: normal Keywords:

Created on 2011-06-20 09:58 by Aleksey Zhurbitsky, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (3)
msg138696 - (view) Author: Aleksey Zhurbitsky (Aleksey Zhurbitsky) Date: 2011-06-20 09:58
I use http://svn.python.org/projects/python/trunk/Demo/sockets/mcast.py to receive multicast stream. When i run one instance of this script to receive certain multicats stream all is fine, but when i run two instance of this script simultaneously to join different multicats stream whith same port - starts mess. Each script gets his packets and packets from other multicast group.
Examples of multicast groups:
rtp://224.1.1.1:1234
rtp://224.1.1.2:1234

I also try to use other code to recive multicast but got the same result - http://stackoverflow.com/questions/6387535/duplicate-packets-in-python-multicast-receiver
msg138708 - (view) Author: Charles-François Natali (neologix) * (Python committer) Date: 2011-06-20 13:38
This is normal.
You're binding twice to the same port thanks to SO_REUSEADDR, but in case of multiple binds to the same UDP port, all packets received are duplicated by the kernel to every socket.
Closing as invalid.
msg138709 - (view) Author: Charles-François Natali (neologix) * (Python committer) Date: 2011-06-20 13:40
Note that the duplication is mandatory for multicast, but with unicast the kernel is free to do whatever he wants, most of the time only one socket will receive it.
History
Date User Action Args
2022-04-11 14:57:18adminsetgithub: 56582
2011-06-20 13:40:56neologixsetmessages: + msg138709
2011-06-20 13:38:08neologixsetstatus: open -> closed

nosy: + neologix
messages: + msg138708

resolution: not a bug
2011-06-20 09:58:06Aleksey Zhurbitskycreate