Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZODB
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
ZODB
Commits
2a862819
Commit
2a862819
authored
Jul 02, 2002
by
Toby Dickenson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
accumulate many strings into single call to send, to minimise the number of packets
parent
48c3c54a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
src/ZEO/smac.py
src/ZEO/smac.py
+4
-1
src/ZEO/zrpc/smac.py
src/ZEO/zrpc/smac.py
+4
-1
No files found.
src/ZEO/smac.py
View file @
2a862819
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
"""Sized message async connections
"""Sized message async connections
"""
"""
__version__
=
"$Revision: 1.1
7
$"
[
11
:
-
2
]
__version__
=
"$Revision: 1.1
8
$"
[
11
:
-
2
]
import
asyncore
,
struct
import
asyncore
,
struct
from
Exceptions
import
Disconnected
from
Exceptions
import
Disconnected
...
@@ -138,6 +138,9 @@ class SizedMessageAsyncConnection(asyncore.dispatcher):
...
@@ -138,6 +138,9 @@ class SizedMessageAsyncConnection(asyncore.dispatcher):
output
=
self
.
__output
output
=
self
.
__output
while
output
:
while
output
:
v
=
output
[
0
]
v
=
output
[
0
]
while
len
(
output
)
>
1
and
len
(
v
)
<
16384
:
del
output
[
0
]
v
+=
output
[
0
]
try
:
try
:
n
=
self
.
send
(
v
)
n
=
self
.
send
(
v
)
except
socket
.
error
,
err
:
except
socket
.
error
,
err
:
...
...
src/ZEO/zrpc/smac.py
View file @
2a862819
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
"""Sized message async connections
"""Sized message async connections
"""
"""
__version__
=
"$Revision: 1.1
7
$"
[
11
:
-
2
]
__version__
=
"$Revision: 1.1
8
$"
[
11
:
-
2
]
import
asyncore
,
struct
import
asyncore
,
struct
from
Exceptions
import
Disconnected
from
Exceptions
import
Disconnected
...
@@ -138,6 +138,9 @@ class SizedMessageAsyncConnection(asyncore.dispatcher):
...
@@ -138,6 +138,9 @@ class SizedMessageAsyncConnection(asyncore.dispatcher):
output
=
self
.
__output
output
=
self
.
__output
while
output
:
while
output
:
v
=
output
[
0
]
v
=
output
[
0
]
while
len
(
output
)
>
1
and
len
(
v
)
<
16384
:
del
output
[
0
]
v
+=
output
[
0
]
try
:
try
:
n
=
self
.
send
(
v
)
n
=
self
.
send
(
v
)
except
socket
.
error
,
err
:
except
socket
.
error
,
err
:
...
...
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