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
Yori Fournier
myplotlib
Commits
52671e3c
Commit
52671e3c
authored
Sep 20, 2017
by
Yori Fournier
Browse files
Merge branch '54-clean-server' of gitlab.aip.de:yfournier/myplotlib into modulate-servant-myplotlib
parents
9fd45a9f
fe6ed4f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
mplClient.py
View file @
52671e3c
...
...
@@ -248,6 +248,8 @@ class MplClient(object):
# Send a receipt
self
.
sendReceipt
(
sock
)
print
(
'CLIENT: I received a data size of: '
+
str
(
dataSize
))
# Wait for the formatted data
packedData
=
self
.
waitForData
(
sock
,
dataSize
)
...
...
@@ -294,7 +296,11 @@ class MplClient(object):
# WAIT FOR DATA ----------------------------------------------------
def
waitForData
(
self
,
sock
,
dataSize
):
'''Wait for data of size dataSize.'''
unpackedData
=
sock
.
recv
(
dataSize
)
receivedSize
=
0
unpackedData
=
b
''
while
receivedSize
<
dataSize
:
unpackedData
+=
sock
.
recv
(
4096
)
receivedSize
=
len
(
unpackedData
)
return
(
unpackedData
)
# UNPACKING --------------------------------------------------------
...
...
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