write the number of results before the results

pull/4/head
Zlatin Balevsky 2019-05-24 19:33:50 +01:00
parent b308b4e91f
commit 5df170f982
1 changed files with 1 additions and 0 deletions

View File

@ -71,6 +71,7 @@ class ResultsSender {
DataOutputStream os = new DataOutputStream(endpoint.getOutputStream())
os.write("POST $uuid\r\n".getBytes(StandardCharsets.US_ASCII))
me.write(os)
os.writeShort((short)results.length)
results.each {
byte [] name = it.getFile().getName().getBytes(StandardCharsets.UTF_8)
def baos = new ByteArrayOutputStream()