Message241213
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. |
|
Date |
User |
Action |
Args |
2015-04-16 11:52:15 | Boris.FELD | set | recipients:
+ Boris.FELD, gvanrossum, vstinner, yselivanov |
2015-04-16 11:52:15 | Boris.FELD | set | messageid: <1429185135.77.0.485030290106.issue23972@psf.upfronthosting.co.za> |
2015-04-16 11:52:15 | Boris.FELD | link | issue23972 messages |
2015-04-16 11:52:14 | Boris.FELD | create | |
|