[Twisted-Python] txThings - simple library for CoAP protocol
Phil Mayers
p.mayers at imperial.ac.uk
Sat Nov 23 05:38:29 MST 2013
On 23/11/13 12:03, Maciej Wasilak wrote:
> 3. There is a problem with txThings IPv6 server, because in most
> operating systems source address of datagram is determined in round
> robin fashion. It may cause the source address of the response to be
> different than destination address of the request.
This is in general a bit of a pain with UDP apps.
In Twisted, the easiest solution is to specifically bind the UDP sockets
to the IP address(es) on the host, and always reply on the same
protocol/transport you received on.
You may find the "netifaces" package helpful for getting a list of IPs
in a cross-platform manner.
In theory you can avoid doing this if you have sendmsg/recvmsg support,
but Twisted doesn't have this (yet).
More information about the Twisted-Python
mailing list