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; }
public NetSyncAttributeAttribute(OpCodeProcess opcode) { OpCode = opcode; }
public DataContext(OpCodeProcess opcode, List<Dictionary<string, object>> sendData) { Loading(); OPCODE = opcode; DATA = sendData; }
public DataContext(OpCodeProcess opcode) { Loading(); OPCODE = opcode; }