Fork a SocketServer on NT
ws-news at gmx.at
Thu Nov 15 14:11:58 CET 2001
I think the threading module provides basic and portable threading.
See the class Thread in there.
if you have a function to handle the connection something like (untested)
def yourHandlerFunction(handlersock, addr):
should get you started.
"GT" <guy.theisen at isp.lu> wrote in message
news:e253b770.0111150446.5dc9ef39 at posting.google.com...
> I'm trying to fork a SocketServer on NT. But I don't know how to do
> this. The os.fork doesn't work on NT. I have this example from the
> Echo_server.py in O'Reilly book "Python for Win32".
> serversock = socket(AF_INET, SOCK_STREAM)
> serversock.bind((HOST, PORT))
> print 'socket listening for connections...'
> while 1:
> handlersock, addr = serversock.accept()
> #now do something with the handler socket
> print 'SocketServer connected by', addr
> data = handlersock.recv(1024)
> print 'SocketServer closed ...'
> Can anyone show me how to solve this .....
> thanks for any help,
More information about the Python-list