From ed3bfb7462d44747230437717e8673a5192f833f Mon Sep 17 00:00:00 2001 From: 陈嘉乐 <cjl@hdlchina.com.cn> Date: 星期一, 30 十一月 2020 20:34:51 +0800 Subject: [PATCH] 2020-11-30-2 --- HDL_ON/DAL/Net/Mqtt_A_Protocol.cs | 27 +++++++++++++++++++++++++++ 1 files changed, 27 insertions(+), 0 deletions(-) diff --git "a/HDL_ON/DAL/Mqtt/-\345\274\203\347\224\250-Mqtt_A_Protocol.cs" b/HDL_ON/DAL/Net/Mqtt_A_Protocol.cs similarity index 83% rename from "HDL_ON/DAL/Mqtt/-\345\274\203\347\224\250-Mqtt_A_Protocol.cs" rename to HDL_ON/DAL/Net/Mqtt_A_Protocol.cs index 2097379..d7dd0dd 100644 --- "a/HDL_ON/DAL/Mqtt/-\345\274\203\347\224\250-Mqtt_A_Protocol.cs" +++ b/HDL_ON/DAL/Net/Mqtt_A_Protocol.cs @@ -132,6 +132,33 @@ // } // try // { +// int readCount = 0; +// BusSocket.Stop(); +// System.Threading.Thread.Sleep(1000); +// BusSocket.Start(); +// System.Threading.Thread.Sleep(1000); +// Control.ReadGatewayIPAddress(); +// while (true) +// { +// if (!string.IsNullOrEmpty(mqttClientIP)) +// { +// break; +// } +// else if (readCount > 10) +// { +// onConnection = false; +// return; +// } +// else +// { +// Control.ReadGatewayIPAddress(); +// System.Threading.Thread.Sleep(200); +// } +// } +// BusSocket.Stop(); +// //System.Threading.Thread.Sleep(1000); +// //BusSocket.Start(6000); +// //System.Threading.Thread.Sleep(1000); // var options = new MqttClientOptionsBuilder()//MQTT杩炴帴鍙傛暟濉厖 // .WithClientId(Guid.NewGuid().ToString().Substring(0, 5))//瀹㈡埛绔疘D -- Gitblit v1.8.0