Hello. I' m trying to use the client's IP address in a method defined inside the SimpleXMLRPCServer. Up till now I'm able to verify that the client's IP is an authorised one (I do this before calling the _dispatch method). I can redefine the _dispatch method extending the SimpleXMLRPCHandler class, and do something like
if (self.client_address[0] not in [list of IPs])
raise self.UnknownIP, "Unknown IP address"
else
*inserts SimpleXMLRPCHandler's _dispatch code in here*
This works just fine, but I need to do something else. I need to have the IP address within the called method to know who's the client calling the method, and act in cosequence. There are 4 possible clients who will be requesting data from the server, and I need to check woh's actually requesting them via IP.
Is there any way to handle the client's IP inside a method in the server?
Thank you very much in advance for your help.
Jose Carlos.
-- http://mail.python.org/mailman/listinfo/python-list