From 9bc0ea236cad9e5c86d0d6fe03eabb327b693096 Mon Sep 17 00:00:00 2001 From: wxr <wxr@hdlchina.com.cn> Date: 星期三, 11 九月 2024 18:03:16 +0800 Subject: [PATCH] Update SplashActivity.cs --- HDL_ON/DAL/DriverLayer/UdpSocket.cs | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/HDL_ON/DAL/DriverLayer/UdpSocket.cs b/HDL_ON/DAL/DriverLayer/UdpSocket.cs index c4b37fd..f6f9c40 100644 --- a/HDL_ON/DAL/DriverLayer/UdpSocket.cs +++ b/HDL_ON/DAL/DriverLayer/UdpSocket.cs @@ -43,8 +43,14 @@ if (Port == 0) return; - busSocket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); - busSocket.EnableBroadcast = true; + try + { + busSocket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); + busSocket.EnableBroadcast = true; + }catch(Exception ex) + { + MainPage.Log("Socket 寮傚父 : " + ex.Message); + } try { busSocket.Bind(new IPEndPoint(IPAddress.Any, Port)); -- Gitblit v1.8.0