private bool ReadNext(G2Header root) { if (ReadSize > 0) { int prevStart = Start; ReadStatus = G2Protocol.ReadNextPacket(root, ref Start, ref ReadSize); ParentPos += (Start - prevStart); if (ReadStatus == G2ReadResult.PACKET_GOOD) { return(true); } } // hit the exact end of the buffer read in, signal to read the next buffer in else { ReadStatus = G2ReadResult.PACKET_INCOMPLETE; } return(false); }