SimpleXMLRPCServer and socket

Juju jujucece at
Tue Sep 26 09:57:05 CEST 2006


2006/9/25, Fredrik Lundh <fredrik at>:
> I don't have time to dig deeper into this right now, but this post might
> be helpful:

I tried to override the "verify_request" method, it managed to get the
ClientAddress, but in this method, the Server is not yet Multithreaded
so I couldn't detect which ClientAddress correspond to which Thread.

So I look more closely at the code (TCPServer, SimpleXMLRPCServer...)
and I finally manage to do what I wanted to do, with overriding the
"finish_request" method and storing the ClientAddresses in a dict
(with the Thread ID as the key) :

def finish_request(self, request, client_address):
  # Override the finish_request to collect the client address
  SimpleXMLRPCServer.SimpleXMLRPCServer.finish_request(self, request,

And now it works !

But I still have a little question :

How can I do to know which method I should override to make the things work ?

Usually, I look at "" but in this case, I couldn't find what
I was looking for.
Finally, I had to look at the source files to understand what I should do.

Thanks in advance...

> (if not, follow up to c.l.python)
> cheers /F

More information about the Python-list mailing list