Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
316e6fb4
Commit
316e6fb4
authored
Oct 29, 1999
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a fix that allows more than one server on non-posix systems.
parent
5584a630
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
518 additions
and
496 deletions
+518
-496
ZServer/medusa/select_trigger.py
ZServer/medusa/select_trigger.py
+259
-248
lib/python/ZServer/medusa/select_trigger.py
lib/python/ZServer/medusa/select_trigger.py
+259
-248
No files found.
ZServer/medusa/select_trigger.py
View file @
316e6fb4
# -*- 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
)
...
...
lib/python/ZServer/medusa/select_trigger.py
View file @
316e6fb4
# -*- 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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment