Browse Source

修改MQTT

DGJ 1 year ago
parent
commit
e86a832d0f
1 changed files with 4 additions and 4 deletions
  1. 4 4
      Assets/Script/MQTTClient.cs

+ 4 - 4
Assets/Script/MQTTClient.cs

@@ -107,7 +107,7 @@ public class MQTTClient : MonoSingleton<MQTTClient>
     //连接
     public void Connect()
     {
-        Debug.Log("DGJ ===> MQTT Connect ");
+        Debug.Log("DGJ ===> MQTT ");
         if (DeviceType.type == "Phone")
         {
             id =UserInfo.Instance.Account + "_Phone";
@@ -148,12 +148,12 @@ public class MQTTClient : MonoSingleton<MQTTClient>
         ushort s = qt.Subscribe(
                         new string[]
                         {
-                                "client/manage",
-                                front+id
+                               
+                                UserInfo.Instance.name
                         },
                         new byte[]
                         {
-                                MqttMsgBase.QOS_LEVEL_EXACTLY_ONCE ,
+                                
                                 MqttMsgBase.QOS_LEVEL_EXACTLY_ONCE
 
                         });