public override UInt16 Read(Byte[] buf, UInt16 offset, int len) { if (len >= offset + 8) { m_Vlue = NetPacketHeader.NtohDouble(buf, offset); return(8); } return(0); }
public override UInt16 Read(Byte[] buf, UInt16 offset, int len) { double[] buffer; UInt16 nResult = offset; UInt16 n = ReadArrayHead(buf, offset); offset += n; if (len >= offset + (m_nLen * 8)) { buffer = new double[m_nLen]; for (n = 0; n < m_nLen; ++n) { buffer[n] = NetPacketHeader.NtohDouble(buf, offset); offset += 8; } m_Vlue = buffer; return((UInt16)(offset - nResult)); } return(0); }