I was reading the documentation of the register_instance method on SimpleXMLRPCServer. It has a method signature of:
SimpleXMLRPCServer.register_instance(instance[, allow_dotted_names])
and I read about the _dispatch()
method:
If instance contains a _dispatch() method, it is called with the requested method name and the parameters from the request. Its API is
def _dispatch(self, method, params)
(note that params does not represent a variable argument list). If it calls an underlying function to perform its task, that function is called asfunc(*params)
, expanding the parameter list. The return value from_dispatch()
is returned to the client as the result. If instance does not have a_dispatch()
method, it is searched for an attribute matching the name of the requested method
What is this _dispatch()
method?
I went through the code of SimpleXMLRPCServer and found about the _dispatch method. This is the method to resolve the call to the function on server side when requested by client. This is the doc statement - "