From e2ea96ed56f7da85989652a395b67d78e19993c6 Mon Sep 17 00:00:00 2001 From: pxzleo Date: Sun, 17 Sep 2017 19:55:36 +0800 Subject: [PATCH] =?UTF-8?q?=E8=80=83=E8=99=91RTK=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=87=87=E7=94=A8=E5=8F=91=E9=80=81---=E6=9C=AA=E5=AE=8C?= =?UTF-8?q?=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Communication/UdpServerConnection_NET.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/PlaneGcsSdk_Shared/Communication/UdpServerConnection_NET.cs b/PlaneGcsSdk_Shared/Communication/UdpServerConnection_NET.cs index b142799..f0158f7 100644 --- a/PlaneGcsSdk_Shared/Communication/UdpServerConnection_NET.cs +++ b/PlaneGcsSdk_Shared/Communication/UdpServerConnection_NET.cs @@ -9,6 +9,7 @@ namespace Plane.Communication internal class UdpServerConnection : UdpConnectionBase { private IPEndPoint _remoteEP; + private IPEndPoint _boardaddEP; private Func> _sendFunc; @@ -17,6 +18,7 @@ namespace Plane.Communication /// public UdpServerConnection(IPEndPoint remoteEP, Func> sendFunc) { + _boardaddEP = new IPEndPoint(IPAddress.Parse("192.168.62.255"), remoteEP.Port); _remoteEP = remoteEP; _sendFunc = sendFunc; } @@ -37,6 +39,13 @@ namespace Plane.Communication try { await _sendFunc(datagram, bytes, _remoteEP).ConfigureAwait(false); + /* + //如果是广播包,用于广播消息,比如RTK等 + if (false) + await _sendFunc(datagram, bytes, _boardaddEP).ConfigureAwait(false); + else + await _sendFunc(datagram, bytes, _remoteEP).ConfigureAwait(false); + */ } catch (Exception ex) {