Hello to all, I'm trying to reproduce the PipeService1 from Mark Hammond's "Python programming on win32" (which you can get on M. Hammond web site, in the sample package, chapter 18). I googled this but there's not much posts about this topic.
I'm trying to use the Service frame in that example but using the SocketServer module to manage the socket connections. Specifically, the SocketServer.ThreadingTCPServer seem to do the job and since it's working right out of the box, I rather use this then write my own. My problem is that in the example, within the infinite loop any deamon/service must have, the script is actually waiting for either of two events to occur before it'll move: the first one to stop the service, the second one is used to tell the process that a client is waiting. I'm ok with the stopping event. But unless I use the win32pipe module, I don't see any way I could tell my script there's a client knocking at the socket. But if so, I can't use the ThreadingTCPServer and I must manage my connections by myself. The idea I have is to start a thread in which the ThreadingTCPServer would run but I'm not sure about what will happen when the service will be stop. Will all that sub-threads be killed? If so I'm ok with it. If you have any other idea, I'm all open.... Thx Guilligan ps : I'm new to this group so please accept my apologies if I don't respect any rule about how to send post or anything. I couldn't find any site containing any such indication. -- http://mail.python.org/mailman/listinfo/python-list