Kristian Rink wrote:
Hi Kent;

On Fri, 22 Apr 2005 10:53:52 -0400
Kent Johnson <[EMAIL PROTECTED]> wrote:


If you want each request to be handled in its own thread, use
ThreadingSOAPServer instead of SOAPServer. If you want to dedicate a
thread to each client, I think you will have to run multiple


Thanks for pointing me the way here... Actually, my current idea is to
run a "master server" which the clients connect to and, while
connecting, get returned a local port number where their "responsible"
SOAP server thread is listening.

Yes, that is the usual way of running a threaded server and that is what ThreadedSOAPServer will do.

Anyhow, do you have a short example or
documentation link handy on how to get ThreadedSOAPServer running?
SOAPpy documentation same as googling for it sadly weren't very
extensive on that... :/

Just change SOAPServer to ThreadedSOAPServer everywhere you use it.

I should say I haven't actually done this, I just looked at the source for 
SOAPpy/Server.py. It has
class SOAPServer(SOAPServerBase, SocketServer.TCPServer):
  ...

and

class ThreadingSOAPServer(SOAPServerBase, SocketServer.ThreadingTCPServer):
  ...

so the only difference between the two is that ThreadingSOAPServer is based on ThreadingTCPServer which has the behaviour you want. For more details see the docs and source for the SocketServer module.

Kent

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to