Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LARN
PRRT
Commits
90aeb210
Commit
90aeb210
authored
Feb 14, 2017
by
Andreas Schmidt
Browse files
Change Cython API to truncate data upon reception.
parent
a814a35b
Pipeline
#823
passed with stages
in 56 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
prrt/prrt.pyx
View file @
90aeb210
...
...
@@ -86,7 +86,7 @@ cdef class PrrtSocket:
cdef
int32_t
len
with
nogil
:
len
=
cprrt
.
PrrtSocket_recv
(
self
.
_c_socket
,
<
void
*>
buffer
)
return
len
,
buffer
return
buffer
[:
len
]
def
connect
(
self
,
host
,
port
):
cdef
bytes
encodedHost
=
host
.
encode
(
"utf-8"
)
...
...
tests/perf/__init__.py
View file @
90aeb210
...
...
@@ -22,8 +22,8 @@ class ReceiverThread(threading.Thread):
def
run
(
self
):
while
(
1
):
len
,
data
=
self
.
sock
.
recv
()
v
=
data
[:
len
]
.
decode
(
'UTF-8'
)
data
=
self
.
sock
.
recv
()
v
=
data
.
decode
(
'UTF-8'
)
seqno
=
v
[:
self
.
seqnoDigits
]
if
seqno
in
self
.
received
:
self
.
duplicates
=
self
.
duplicates
+
1
...
...
Write
Preview
Supports
Markdown
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