Commit 9fd45a9f authored by Yori Fournier's avatar Yori Fournier
Browse files

formatRawData works now server side

tested with mfdv2, not yet clean and too many verbose
parent 3050ddf6
......@@ -207,7 +207,7 @@ class MplServer():
G_RAWDATA[dataName] = fct(*args, **kwargs)
if (DEBUG):
print(INFO+"SERVER: I read the data following instructions")
print(str(G_RAWDATA[dataName].data)) # SHOULD BE SUPPRESS LATER
# print(str(G_RAWDATA[dataName].data)) # SHOULD BE SUPPRESS LATER
print(WARN+"SERVER: The instructions of readData could not be executed.")
......@@ -461,8 +461,10 @@ class MplServer():
packedData = self.packFormattedData(datas)
answer = ('syncFigFormatRawData', packedData, 'The figure could format the rawData.')
dataSize = len(str(answer)) + 2
# print(answer)
dataSize = len(str(answer).encode('utf-8')) + 2
print('The calculated dataSize is: '+str(dataSize))
# Send the size of the data
self.sendAnswer(conn, ('syncFigFormatRawData', dataSize, 'The figure could format the rawData.'))
......@@ -483,6 +485,9 @@ class MplServer():
def sendAnswer(self, conn, answer):
'''Send an answer to all clients.'''
answer = self.packAnswer(answer)
print('The length of the packed answer is: '+str(len(answer.encode('utf-8'))))
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