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
00bc29d8
Commit
00bc29d8
authored
May 22, 2000
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Re-added fix to select_trigger to allow multiple Zopes to coexist.
parent
500c9285
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
6 deletions
+34
-6
ZServer/medusa/select_trigger.py
ZServer/medusa/select_trigger.py
+17
-3
lib/python/ZServer/medusa/select_trigger.py
lib/python/ZServer/medusa/select_trigger.py
+17
-3
No files found.
ZServer/medusa/select_trigger.py
View file @
00bc29d8
# -*- Mode: Python; tab-width: 4 -*-
VERSION_STRING
=
"$Id: select_trigger.py,v 1.
9 2000/01/14 02:35:56 amos
Exp $"
VERSION_STRING
=
"$Id: select_trigger.py,v 1.
10 2000/05/22 14:53:27 brian
Exp $"
import
asyncore
import
asynchat
...
...
@@ -99,8 +99,22 @@ else:
a
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_STREAM
)
w
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_STREAM
)
# tricky: get a pair of connected sockets
a
.
bind
(
self
.
address
)
# set TCP_NODELAY to true to avoid buffering
w
.
setsockopt
(
socket
.
IPPROTO_TCP
,
1
,
1
)
# tricky: get a pair of connected sockets
host
=
'127.9.9.9'
port
=
19999
while
1
:
try
:
self
.
address
=
(
host
,
port
)
a
.
bind
(
self
.
address
)
break
except
:
if
port
<=
19950
:
raise
'Bind Error'
,
'Cannot bind trigger!'
port
=
port
-
1
a
.
listen
(
1
)
w
.
setblocking
(
0
)
try
:
...
...
lib/python/ZServer/medusa/select_trigger.py
View file @
00bc29d8
# -*- Mode: Python; tab-width: 4 -*-
VERSION_STRING
=
"$Id: select_trigger.py,v 1.
9 2000/01/14 02:35:56 amos
Exp $"
VERSION_STRING
=
"$Id: select_trigger.py,v 1.
10 2000/05/22 14:53:27 brian
Exp $"
import
asyncore
import
asynchat
...
...
@@ -99,8 +99,22 @@ else:
a
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_STREAM
)
w
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_STREAM
)
# tricky: get a pair of connected sockets
a
.
bind
(
self
.
address
)
# set TCP_NODELAY to true to avoid buffering
w
.
setsockopt
(
socket
.
IPPROTO_TCP
,
1
,
1
)
# tricky: get a pair of connected sockets
host
=
'127.9.9.9'
port
=
19999
while
1
:
try
:
self
.
address
=
(
host
,
port
)
a
.
bind
(
self
.
address
)
break
except
:
if
port
<=
19950
:
raise
'Bind Error'
,
'Cannot bind trigger!'
port
=
port
-
1
a
.
listen
(
1
)
w
.
setblocking
(
0
)
try
:
...
...
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