陈嘉乐
2020-06-16 7167334c0e89dd84827d59e726123d14776e3a09
HDL_ON/DriverLayer/BusSocket.cs
@@ -1,7 +1,7 @@
using System;
using System.Net.Sockets;
using System.Net;
using HDL_ON.UI;
//using HDL_ON.UI;
namespace HDL_ON
{
@@ -63,8 +63,6 @@
         }
         catch { }
         busSocket = null;
            //HDL_ON.SimpleControl.Phone.Music.A31PlayMusicPage.isExit = true;
            //SmartHome.MqttCommon.DisConnect ();
            MainPage.Log("BusSocket关闭成功!");
      }
@@ -138,16 +136,19 @@
      {
         try
         {
                if (!IsRunning) {
                    return;
                }
            if (!IsRunning)
            {
               tempPacket.HaveSendCount++;
               return;
            }
            tempPacket.FlagDateTime = System.DateTime.Now;
            tempPacket.HaveSendCount++;
            busSocket.BeginSendTo(tempPacket.Bytes, 0, tempPacket.Bytes.Length, SocketFlags.None, tempPacket.RemoteEndPoint, new AsyncCallback(asyncEndSend), tempPacket);
         }
         catch {
            }
         catch (Exception ex)
         {
            MainPage.Log($"AsyncBeginSend error {ex.Message}");
         }
      }
      /// <summary>