[Twisted-Python] Getting peer IP address from Perspective Broker

J French hikenboots at gmail.com
Mon Jul 25 11:53:22 EDT 2005


Is there an accessible method to retrieve a peer's ip address from
within pb?  I just want to log it.

I read the Faq and see how to do it when subclassing protocol i.e.:
class MyProtocol(protocol.Protocol):
    def connectionMade(self):
        print "connection from", self.transport.getPeer()

I'd appreciate it if someone can point me in the right direction.

TIA




More information about the Twisted-Python mailing list