Esempio n. 1
0
        public static byte[] GetCmd(OpCodeProcess opcode, string contains)
        {
            byte[] code = new byte[] { (byte)opcode };
            byte[] data = Encoding.Unicode.GetBytes(contains);
            byte[] lenth = BitConverter.GetBytes(data.Length);

            byte[] command = new byte[code.Length + data.Length + lenth.Length];

            System.Buffer.BlockCopy(code, 0, command, 0, code.Length);
            System.Buffer.BlockCopy(lenth, 0, command, code.Length, lenth.Length);
            System.Buffer.BlockCopy(data, 0, command, code.Length + lenth.Length, data.Length);

            return command;
        }
Esempio n. 2
0
 public NetSyncAttributeAttribute(OpCodeProcess opcode)
 {
     OpCode = opcode;
 }
Esempio n. 3
0
 public DataContext(OpCodeProcess opcode, List<Dictionary<string, object>> sendData)
 {
     Loading();
     OPCODE = opcode;
     DATA = sendData;
 }
Esempio n. 4
0
 public DataContext(OpCodeProcess opcode)
 {
     Loading();
     OPCODE = opcode;
 }