コード例 #1
0
        void TestPackets()
        {
            Packet p = new Packet(Opcode.Test);
            p.WriteString("F**K");
            p.WriteInt32(123);
            byte[] bytes = p.GetBytes();

            Opcode opc = (Opcode)BitConverter.ToInt16(bytes, 0);
            short length = BitConverter.ToInt16(bytes, 2);
            string Data = p.ReadString();
            int i = p.ReadInt32();
        }