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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top