Esempio n. 1
0
 public ulong ReadULong()
 {
     ReadBytes(m_64b, 0, 8);
     return(BitConverter.ToUInt64(NetBuffer.ReverseOrder(m_64b), 0));
 }
Esempio n. 2
0
 public ushort ReadUShort()
 {
     ReadBytes(m_16b, 0, 2);
     return(BitConverter.ToUInt16(NetBuffer.ReverseOrder(m_16b), 0));
 }
Esempio n. 3
0
 public uint ReadUInt()
 {
     ReadBytes(m_32b, 0, 4);
     return(BitConverter.ToUInt32(NetBuffer.ReverseOrder(m_32b), 0));
 }
Esempio n. 4
0
 public float ReadFloat()
 {
     ReadBytes(m_32b, 0, 4);
     return(BitConverter.ToSingle(NetBuffer.ReverseOrder(m_32b), 0));
 }
Esempio n. 5
0
 public double ReadDouble()
 {
     ReadBytes(m_64b, 0, 8);
     return(BitConverter.ToDouble(NetBuffer.ReverseOrder(m_64b), 0));
 }
Esempio n. 6
0
 public void WriteULong(ulong l, int writePos = -1)
 {
     byte[] bytes = BitConverter.GetBytes(l);
     this.WriteBytes(NetBuffer.ReverseOrder(bytes), writePos);
 }
Esempio n. 7
0
 public int WriteFloat(float value, int writePos = -1)
 {
     byte[] bytes = BitConverter.GetBytes(value);
     return(WriteBytes(NetBuffer.ReverseOrder(bytes), writePos));
 }