wei
2020-12-24 24a2c4998ee6d6a2b584d89804ebf99afc5f3629
HDL_ON/DAL/Mqtt/MqttClient.cs
@@ -32,18 +32,18 @@
        /// </summary>
        static string RandomKey = "";
        /// <summary>
        /// 随机生成字符
        /// </summary>
        /// <returns></returns>
        static string GetRandomKey()
        {
            if (string.IsNullOrEmpty(RandomKey))
            {
                //随机2位字符串
                Random random = new Random(Guid.NewGuid().GetHashCode());
                int num = random.Next(65, 91);
                RandomKey = Convert.ToChar(num).ToString();
                RandomKey = Utlis.CreateRandomString(2);
            }
            return RandomKey;
        }
        /// <summary>
@@ -291,12 +291,12 @@
                                            packet.Bytes = e.ApplicationMessage.Payload;
                                        }
#if DEBUG
                                        string ddd = "";
                                        foreach (var bb in packet.Bytes)
                                        {
                                            ddd += bb + ",";
                                        }
                                        MainPage.Log($"mqtt bus data:{ddd}");
                                        //string ddd = "";
                                        //foreach (var bb in packet.Bytes)
                                        //{
                                        //    ddd += bb + ",";
                                        //}
                                        //MainPage.Log($"mqtt bus data:{ddd}");
#endif
                                        packet.Manager();
                                    }