[Twisted-Python] Can I get the interface's IP addr from where the datagram is received?

Eric Hsu nkeric at gmail.com
Wed Jul 6 06:45:34 EDT 2005

Hi all,

I'm writting a udp server which may have multiple instances listening
on multiple network interfaces, I need to get the network interface's
address when datagrame received:

class MyUdpServer(DatagramProtocol):
    def datagramReceived(self, data, addr):
        print "The client's addr is", addr
        print "My addr is", ???

How can I retrieve the IP?
Thanks in advance!

- Eric

More information about the Twisted-Python mailing list