Commit 5a897923 authored by Yori 'AGy' Fournier's avatar Yori 'AGy' Fournier
Browse files

Now formatrawdata is working client side.

tested and working, not yet very clean
parent 823dcbd3
......@@ -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 --------------------------------------------------------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment