Richard, thank you very much - this post is exactly what I need. Python supports recvmsg, and sendmsg from version 3.3, but Twisted has its own implementation that is 2.7 compatible. I'll try that right away. I think it's best to include the recvmsg/sendmsg code into my DatagramProtocol subclass.
Best Regards Maciek 2013/10/16 Richard Wall <m-li...@the-moon.net> > On 16 October 2013 12:47, Itamar Turner-Trauring <ita...@itamarst.org> > wrote: > > On 10/16/2013 03:36 AM, Maciej Wasilak wrote: > >> All in all the problem with using wrong source address can be easilly > >> solved with a bit of user attention, however it's hard to find the > solution > >> that "just works". > >> > > There's an OS API (recvmsg?) that lets you get at this information; I > > believe Twisted has the start of a wrapper for it. Given a full wrapper > we > > could create a new UDP API that did support this easily. > > Here's a good description of how PowerDNS solved this problem using > recvmsg: > * > http://bert-hubert.blogspot.nl/2012/10/on-binding-datagram-udp-sockets-to-any.html > > I don't think it's currently possible to listenUDP on a specific IPv6 > address: > * https://twistedmatrix.com/trac/ticket/5086 > > But the branch for that ticket is almost ready to be merged... it just > needs a few custom exception classes I think. > > -RichardW. > > _______________________________________________ > Twisted-Python mailing list > Twisted-Python@twistedmatrix.com > http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python >
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python