From 0af30aadd6e0b6549bdcc6c2b2c82b8d12294b85 Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期三, 10 十一月 2021 17:26:23 +0800 Subject: [PATCH] 2021-11-10 1.Android没适配乐橙国内环境问题修复。 --- HDL_ON/DAL/DriverLayer/UdpSocket.cs | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/HDL_ON/DAL/DriverLayer/UdpSocket.cs b/HDL_ON/DAL/DriverLayer/UdpSocket.cs index ab3cb02..4946986 100644 --- a/HDL_ON/DAL/DriverLayer/UdpSocket.cs +++ b/HDL_ON/DAL/DriverLayer/UdpSocket.cs @@ -46,10 +46,9 @@ busSocket = new Socket (AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); busSocket.EnableBroadcast = true; try { - //busSocket.Bind (new IPEndPoint (IPAddress.Any, 6000)); - busSocket.Bind(new IPEndPoint(IPAddress.Any, Port)); + busSocket.Bind(new IPEndPoint(IPAddress.Any, Port)); - busSocket.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.AddMembership, new MulticastOption(IPAddress.Parse("239.0.168.188"))); + busSocket.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.AddMembership, new MulticastOption(IPAddress.Parse("239.0.168.188"))); } catch{ busSocket = null; -- Gitblit v1.8.0