Exemplo n.º 1
0
 public override UInt16 Read(Byte[] buf, UInt16 offset, int len)
 {
     if (len >= offset + 4)
     {
         m_Vlue = NetPacketHeader.NtohUint32(buf, offset);
         return(4);
     }
     return(0);
 }
Exemplo n.º 2
0
        public override UInt16 Read(Byte[] buf, UInt16 offset, int len)
        {
            UInt32[] buffer;
            UInt16   nResult = offset;
            UInt16   n       = ReadArrayHead(buf, offset);

            offset += n;
            if (len >= offset + (m_nLen * 4))
            {
                buffer = new UInt32[m_nLen];
                for (n = 0; n < m_nLen; ++n)
                {
                    buffer[n] = NetPacketHeader.NtohUint32(buf, offset);
                    offset   += 4;
                }
                m_Vlue = buffer;
                return((UInt16)(offset - nResult));
            }
            return(0);
        }