SimpleXMLRPCServer - revisited

J

Jan Danielsson

Hello all,

I want to be able to determine the IP address of the client making an
XMPRPC call.

I got the tip to use this:
-------------------------------
class RPCServer(SimpleXMLRPCServer):

def _dispatch(self, method, params):
"""Extend dispatch, adding client info to some parameters."""
if method in ({my list of methods I needed client address}):
return SimpleXMLRPCServer._dispatch(self, method,
params+(self.client_address,))
return SimpleXMLRPCServer._dispatch(self, method, params);
-------------------------------

But it complains that it can not find 'client_address'.

It may be relevant to point out that I am using this:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,981
Messages
2,570,188
Members
46,732
Latest member
ArronPalin

Latest Threads

Top