Fixed some bugs with reading data back from the server, including

subtracting 4 from the length of the frame and fixing the reading
of fields for which we have a basic streamer.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3885 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Ray Greenwell
2006-02-23 22:22:57 +00:00
parent 6d9d71256f
commit 465b680aa2
4 changed files with 46 additions and 46 deletions
+6 -1
View File
@@ -33,7 +33,12 @@ public class FrameReader extends EventDispatcher
// all at once
return;
}
_length = _socket.readInt();
// the length specified is the length of the entire frame,
// including the length of the bytes used to encode the length.
// (I think this is pretty silly).
// So for our purposes we subtract 4 bytes so we know how much
// more data is in the frame.
_length = _socket.readInt() - HEADER_SIZE;
_curData = new ByteArray();
_curData.endian = Endian.BIG_ENDIAN;
}