From fd1f19e8479c764fa28b0da3a2f9b34a3debe772 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期四, 03 八月 2023 21:47:04 +0800
Subject: [PATCH] 2023年08月03日21:47:02
---
HDL_ON/DAL/DriverLayer/UdpSocket.cs | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/HDL_ON/DAL/DriverLayer/UdpSocket.cs b/HDL_ON/DAL/DriverLayer/UdpSocket.cs
index f0893ff..36637f9 100644
--- a/HDL_ON/DAL/DriverLayer/UdpSocket.cs
+++ b/HDL_ON/DAL/DriverLayer/UdpSocket.cs
@@ -50,8 +50,10 @@
busSocket.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.AddMembership, new MulticastOption(IPAddress.Parse("239.0.168.188")));
}
- catch{
- busSocket = null;
+ catch (Exception ex){
+ MainPage.Log ($"udp port bind error : {ex.Message}");
+
+ busSocket = null;
return;
}
@@ -75,7 +77,7 @@
}
catch { }
busSocket = null;
- MainPage.Log("Socket鍏抽棴");
+ MainPage.Log("Socket鍏抽棴");
}
/// <summary>
@@ -138,7 +140,6 @@
//mqtt杩炴帴鏁版嵁璇诲彇 A鍗忚缃戠粶璁惧淇℃伅璇诲彇鍥炲 澶勭悊
if (((IPEndPoint)packet.RemoteEndPoint).Port == 8585)
{
- MainPage.Log($"灞�鍩熺綉udp淇℃伅");
Control.Ins.ConvertReceiveData(bytes, ((IPEndPoint)packet.RemoteEndPoint).Address.ToString());
}
else if (((IPEndPoint)packet.RemoteEndPoint).Port == 6000)//澶勭悊bus 6000绔彛鐨勬暟鎹�
--
Gitblit v1.8.0