[FIX] message can now be 4 bytes long

This commit is contained in:
Sem van der Hoeven
2020-10-20 18:17:42 +02:00
parent 33574a7b23
commit f6c70bc717

View File

@@ -59,7 +59,7 @@ namespace SharedClientServer
// put the identifier at the start of the payload part // put the identifier at the start of the payload part
res[4] = identifier; res[4] = identifier;
// put the length of the payload at the start of the res array // put the length of the payload at the start of the res array
res[0] = BitConverter.GetBytes(payloadBytes.Length+5); Array.Copy(BitConverter.GetBytes(payloadBytes.Length+5),0,res,0,4);
return res; return res;
} }
} }