陈嘉乐
2020-10-13 611786df5108dca0bdcff03834cc285cba4b8e61
HDL_ON/DriverLayer/BusSocket.cs
@@ -115,7 +115,7 @@
         try
         {
                asyncBeginReceive ();
            asyncBeginReceive();
            Packet packet = (Packet)iar.AsyncState;
            int len = busSocket.EndReceiveFrom(iar, ref packet.RemoteEndPoint);
@@ -123,6 +123,7 @@
            packet.Bytes = new byte[len];
            Array.Copy(bytes, 0, packet.Bytes, 0, packet.Bytes.Length);
            //mqtt连接数据读取
            if (packet.RemoteEndPoint.ToString() == "172.16.2.237:6688")
            {
               var reString = DAL.CommonPage.MyEncodingUTF8.GetString(bytes);
@@ -134,10 +135,12 @@
            }
            packet.Manager();
            Control.controlLostCount = 0;
         }
         catch (Exception ex) {
            MainPage.Log($"异步接收数据结束 {ex.Message}");
            }
         catch (Exception ex)
         {
            MainPage.Log($"异步接收数据结束 {ex.Message},{((Packet)iar.AsyncState).Bytes}");
         }
      }
      /// <summary>