SeekZero() public method

public SeekZero ( ) : void
return void
コード例 #1
0
ファイル: ChannelBuffer.cs プロジェクト: Hengle/JellyTerain
 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);
 }
コード例 #2
0
        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);
            }
        }
コード例 #3
0
 public void SeekZero()
 {
     m_Buffer.SeekZero();
 }
コード例 #4
0
 /// <summary>
 /// Sets the current position of the reader's stream to the start of the stream.
 /// </summary>
 public void SeekZero()
 {
     m_buf.SeekZero();
 }