SimpleXMLRPCServer - client address

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jan Danielsson

    #1

    SimpleXMLRPCServer - client address

    Hello all,

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

    --
    Kind regards,
    Jan Danielsson
  • c james

    #2
    Re: SimpleXMLRPCSer ver - client address

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

    class RPCServer(Simpl eXMLRPCServer):

    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 SimpleXMLRPCSer ver._dispatch(s elf, method,
    params+(self.cl ient_address,))
    return SimpleXMLRPCSer ver._dispatch(s elf, method, params);

    Comment

    Working...