Example #1
0
        public Agent.BlobHeader ReadHeader()
        {
            Agent.BlobHeader header = new Agent.BlobHeader();

            header.BlobLength = ReadUInt32();
            if (Stream.CanSeek && Stream.Length - Stream.Position < header.BlobLength)
            {
                throw new Exception("Not enough data");
            }
            header.Message = (Agent.Message)ReadUInt8();
            return(header);
        }
Example #2
0
        public Agent.BlobHeader ReadHeader()
        {
            Agent.BlobHeader header = new Agent.BlobHeader();

              header.BlobLength = ReadInt();
              if (Stream.CanSeek && Stream.Length - Stream.Position < header.BlobLength) {
            throw new Exception("Not enough data");
              }
              header.Message = (Agent.Message)ReadByte();
              return header;
        }