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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user