示例#1
0
 public void Write(UInt16 source, int numberOfBits)
 {
     EnsureBufferSize(m_bitLength + numberOfBits);
     NetBitWriter.WriteUInt16(source, numberOfBits, m_data, m_bitLength);
     m_bitLength += numberOfBits;
 }
示例#2
0
 /// <summary>
 /// Writes a signed 16 bit integer
 /// </summary>
 public void Write(Int16 source)
 {
     EnsureBufferSize(m_bitLength + 16);
     NetBitWriter.WriteUInt16((ushort)source, 16, m_data, m_bitLength);
     m_bitLength += 16;
 }
示例#3
0
        /// <summary>
        /// write the size of the message to the beginning 2 bytes. Maximum of 65535 length supported.
        /// </summary>
        internal void WriteSize()
        {
            var size = LengthBytes - 2;

            NetBitWriter.WriteUInt16(checked ((ushort)size), 16, Data, 0);
        }