internal bool HandleFragment(NetworkReader reader) { if (reader.ReadByte() == 0) { if (!readingFragment) { fragmentBuffer.SeekZero(); readingFragment = true; } byte[] array = reader.ReadBytesAndSize(); fragmentBuffer.WriteBytes(array, (ushort)array.Length); return(false); } readingFragment = false; return(true); }
internal bool HandleFragment(NetworkReader reader) { int state = reader.ReadByte(); if (state == 0) { if (readingFragment == false) { fragmentBuffer.SeekZero(); readingFragment = true; } byte[] data = reader.ReadBytesAndSize(); fragmentBuffer.WriteBytes(data, (ushort)data.Length); return(false); } else { readingFragment = false; return(true); } }
public void SeekZero() { m_Buffer.SeekZero(); }
/// <summary> /// Sets the current position of the reader's stream to the start of the stream. /// </summary> public void SeekZero() { m_buf.SeekZero(); }