SimpleXMLRPCServer - client address

J

Jan Danielsson

Hello all,

I writing an application based on the SimpleXMLRPCServer class. I
would like to know the IP address of the client performing the RPC. Is
that possible, without having to abandon the SimpleXMLRPCServer class?
 
C

c james

Jan said:
Hello all,

I writing an application based on the SimpleXMLRPCServer class. I
would like to know the IP address of the client performing the RPC. Is
that possible, without having to abandon the SimpleXMLRPCServer class?
I did this a long time ago so it's not likely the best solution.

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);
 

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,733
Latest member
LonaMonzon

Latest Threads

Top