コード例 #1
0
 public override void WriteTo(byte[] buf, ref int i)
 {
     Bit.WriteInt32(buf, ref i, verificationCode.Length);
     foreach (var b in verificationCode)
     {
         Bit.WriteUInt8(buf, ref i, b);
     }
 }
コード例 #2
0
            public ClientVerifyMessage(byte[] buf, ref int i) : base(KType)
            {
                int byteCount = Bit.ReadInt32(buf, ref i);

                verificationCode = new byte[byteCount];
                for (int j = 0; j < byteCount; ++j)
                {
                    verificationCode[j] = Bit.ReadUInt8(buf, ref i);
                }
            }
コード例 #3
0
 public override void WriteTo(byte[] buf, ref int i)
 {
     Bit.WriteUInt8(buf, ref i, (byte)(result ? 1 : 0));
 }
コード例 #4
0
            public ServerVerifyResultMessage(byte[] buf, ref int i) : base(KType)
            {
                byte val = Bit.ReadUInt8(buf, ref i);

                result = val != 0;
            }
コード例 #5
0
        public string ReadString()
        {
            int byteCount = Bit.ReadUInt16(bytes, ref i);

            return(Bit.ReadString(bytes, ref i, byteCount));
        }
コード例 #6
0
 public int ReadInt32()
 {
     return(Bit.ReadInt32(bytes, ref i));
 }
コード例 #7
0
 public float ReadSingle()
 {
     return(Bit.ReadSingle(bytes, ref i));
 }
コード例 #8
0
 public byte ReadByte()
 {
     return(Bit.ReadUInt8(bytes, ref i));
 }
コード例 #9
0
 public short ReadInt16()
 {
     return(Bit.ReadInt16(bytes, ref i));
 }
コード例 #10
0
 public void WriteString(string val)
 {
     Bit.WriteUInt16(bytes, ref i, (ushort)Bit.GetStringByteCount(val));
     Bit.WriteString(bytes, ref i, val);
 }
コード例 #11
0
        public bool ReadBoolean()
        {
            byte val = Bit.ReadUInt8(bytes, ref i);

            return(val != 0);
        }
コード例 #12
0
 public void WriteSingle(float val)
 {
     Bit.WriteSingle(bytes, ref i, val);
 }
コード例 #13
0
 public void WriteInt32(int val)
 {
     Bit.WriteInt32(bytes, ref i, val);
 }
コード例 #14
0
 public void WriteInt16(short val)
 {
     Bit.WriteInt16(bytes, ref i, val);
 }
コード例 #15
0
 public void WriteByte(byte val)
 {
     Bit.WriteUInt8(bytes, ref i, val);
 }
コード例 #16
0
 public void WriteBoolean(bool val)
 {
     Bit.WriteUInt8(bytes, ref i, (byte)(val ? 1 : 0));
 }