Fork a SocketServer on NT
GT
guy.theisen at isp.lu
Thu Nov 15 07:46:04 EST 2001
Hi,
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))
serversock.listen(5)
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)
handlersock.send(data)
handlersock.close()
print 'SocketServer closed ...'
Can anyone show me how to solve this .....
thanks for any help,
GT
More information about the Python-list
mailing list