socket debugger: 2bytes for string length

This commit is contained in:
Jindra Petřík
2014-10-28 18:09:04 +01:00
parent 6f5d460029
commit 925dfc4622
3 changed files with 29 additions and 22 deletions

View File

@@ -26,7 +26,8 @@
private static function writeString(msg){
var b:ByteArray = new ByteArray();
b.writeUTFBytes(msg);
s.writeByte(b.length);
s.writeByte((b.length>>8) & 0xff);
s.writeByte(b.length & 0xff);
s.writeBytes(b,0,b.length);
}