[New-bugs-announce] [issue23972] Asyncio reuseport
Boris FELD
report at bugs.python.org
Thu Apr 16 13:52:15 CEST 2015
New submission from Boris FELD:
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.
----------
components: asyncio
messages: 241213
nosy: Boris.FELD, gvanrossum, haypo, yselivanov
priority: normal
severity: normal
status: open
title: Asyncio reuseport
type: behavior
versions: Python 3.4, Python 3.5, Python 3.6
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23972>
_______________________________________
More information about the New-bugs-announce
mailing list