Commit 316e6fb4 authored by 's avatar

Added a fix that allows more than one server on non-posix systems.

parent 5584a630
# -*- Mode: Python; tab-width: 4 -*-
VERSION_STRING = "$Id: select_trigger.py,v 1.6 1999/08/17 20:29:20 brian Exp $"
VERSION_STRING = "$Id: select_trigger.py,v 1.7 1999/10/29 15:04:27 brian Exp $"
import asyncore
import asynchat
......@@ -103,6 +103,17 @@ else:
w.setsockopt(socket.IPPROTO_TCP, 1, 1)
# tricky: get a pair of connected sockets
host='127.9.9.9'
port=19950
while 1:
try:
self.address=(host, port)
a.bind(self.address)
break
except:
if port >= 19999:
raise 'Bind Error', 'Cannot bind trigger!'
port=port + 1
a.bind (self.address)
a.listen (1)
w.setblocking (0)
......
# -*- Mode: Python; tab-width: 4 -*-
VERSION_STRING = "$Id: select_trigger.py,v 1.6 1999/08/17 20:29:20 brian Exp $"
VERSION_STRING = "$Id: select_trigger.py,v 1.7 1999/10/29 15:04:27 brian Exp $"
import asyncore
import asynchat
......@@ -103,6 +103,17 @@ else:
w.setsockopt(socket.IPPROTO_TCP, 1, 1)
# tricky: get a pair of connected sockets
host='127.9.9.9'
port=19950
while 1:
try:
self.address=(host, port)
a.bind(self.address)
break
except:
if port >= 19999:
raise 'Bind Error', 'Cannot bind trigger!'
port=port + 1
a.bind (self.address)
a.listen (1)
w.setblocking (0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment