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.

Author Boris.FELD
Recipients Boris.FELD, gvanrossum, vstinner, yselivanov
Date 2015-04-16.11:52:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1429185135.77.0.485030290106.issue23972@psf.upfronthosting.co.za>
In-reply-to
Content
I'm trying to create some UDP sockets for doing multicast communication. I have the working code in synchronous way and try to port it to asyncio.

One last issue is blocking for me, I'm on Mac OS X and for multicast UDP to work, the SO_REUSEPORT must be set on socket before bind. The problem is that I don't have access on socket, it's created inside asyncio method _create_connection_transport.

I've seen that SO_REUSEADDR is already set (https://github.com/gvanrossum/tulip-try3/blob/7b2d8abfce1d7ef18ef516f9b1b7032172630375/asyncio/base_events.py#L720), so maybe we could also set SO_REUSEPORT only on platforms where it's available. `if hasattr(socket, 'SO_REUSEPORT')` should works.

Or we could add an optional arguments with could be used to set some socket options, it could be more flexible that set SO_REUSEPORT.

I could provide a patch for the best solution selected.
History
Date User Action Args
2015-04-16 11:52:15Boris.FELDsetrecipients: + Boris.FELD, gvanrossum, vstinner, yselivanov
2015-04-16 11:52:15Boris.FELDsetmessageid: <1429185135.77.0.485030290106.issue23972@psf.upfronthosting.co.za>
2015-04-16 11:52:15Boris.FELDlinkissue23972 messages
2015-04-16 11:52:14Boris.FELDcreate