[Twisted-Python] anyway to know client address in XMLRPC?
mailinglists at smartology.nl
Thu Mar 29 05:24:05 EDT 2007
wang wei wrote:
> hello, I need to know the client address connected to my Twisted
> XMLRPC server, is there any way?
> the fellow code couldn't work in my machine.
> class Examle(xmlrpc.XMLRPC):
> """An example object to be published."""
> def _getPeerAddress(self):
> return self.request.getClientIP()
> def render(self, request):
> self.request = request
> xmlrpc.XMLRPC.render(self, request)
> the result is said:
> "C:\Python24\lib\site-packages\twisted\web\server.py:272: UserWarning: Warning! r
> equest.finish called twice.
> then how can I get client address in twisted?
def render(self, request):
self.request = request
return xmlrpc.XMLRPC.render(self, request)
- Remi -
More information about the Twisted-Python