How can I used WaitForMultiple Objects() with sockets? The code (shown
below) respresents a very simple echo server using sockets. I need
WaitForMultiple Objects() so I can wait for both a new connection and
the stop command from the service manager.
Your help is greatly appreciated. Thanks.
Olaf
def SvcDoRun(self):
sock = socket(AF_INET, SOCK_STREAM)
sock.bind(('loc alhost', 53574))
sock.listen(1)
connection, addr = sock.accept()
data = connection.recv (1024)
connection.send (data)
connection.clos e()
# We do nothing other than wait to be stopped!
win32event.Wait ForSingleObject (self.hWaitStop ,
win32event.INFI NITE)
below) respresents a very simple echo server using sockets. I need
WaitForMultiple Objects() so I can wait for both a new connection and
the stop command from the service manager.
Your help is greatly appreciated. Thanks.
Olaf
def SvcDoRun(self):
sock = socket(AF_INET, SOCK_STREAM)
sock.bind(('loc alhost', 53574))
sock.listen(1)
connection, addr = sock.accept()
data = connection.recv (1024)
connection.send (data)
connection.clos e()
# We do nothing other than wait to be stopped!
win32event.Wait ForSingleObject (self.hWaitStop ,
win32event.INFI NITE)
Comment