[Twisted-Python] How do you get clients ip addys with xmlrpc

Daniel Newton daniel at nextwindow.net
Sun May 23 18:23:24 EDT 2004

Some gave me this snippet of code:

/class Example(xmlrpc.XMLRPC):
//     """An example object to be published."""//
     def xmlrpc_whatIsMyAddress(self):
         return self.transport.getPeer().host
// if __name__ == '__main__':
//     from twisted.internet import reactor
//     r = Example()
//     reactor.listenTCP(7080, server.Site(r))
//     reactor.run()/

but it doesnt work ("Example instance has no attribute 'transport'")
the transport attribute is not there.. so where is it???

More information about the Twisted-Python mailing list