Whoops!
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5361 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -63,8 +63,14 @@ public class FrameReader extends EventDispatcher
|
|||||||
"socketHasData(" + _socket.bytesAvailable + ")");
|
"socketHasData(" + _socket.bytesAvailable + ")");
|
||||||
}
|
}
|
||||||
|
|
||||||
while (_socket.bytesAvailable >= HEADER_SIZE) {
|
while (_socket.bytesAvailable > 0) {
|
||||||
if (_curData == null) {
|
if (_curData == null) {
|
||||||
|
if (_socket.bytesAvailable < HEADER_SIZE) {
|
||||||
|
// if there are less bytes available than a header, let's
|
||||||
|
// just leave them on the socket until we can read the length
|
||||||
|
// all at once
|
||||||
|
return;
|
||||||
|
}
|
||||||
// the length specified is the length of the entire frame,
|
// the length specified is the length of the entire frame,
|
||||||
// including the length of the bytes used to encode the length.
|
// including the length of the bytes used to encode the length.
|
||||||
// (I think this is pretty silly).
|
// (I think this is pretty silly).
|
||||||
|
|||||||
Reference in New Issue
Block a user