From 70e1f6c11d3b71c73c3ed39760b9461bb5a67a17 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期五, 28 七月 2023 10:31:03 +0800 Subject: [PATCH] Update Control_TcpClient.cs --- HDL_ON/DAL/DriverLayer/Control_TcpClient.cs | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/HDL_ON/DAL/DriverLayer/Control_TcpClient.cs b/HDL_ON/DAL/DriverLayer/Control_TcpClient.cs index 2c53a79..f9bcf3a 100644 --- a/HDL_ON/DAL/DriverLayer/Control_TcpClient.cs +++ b/HDL_ON/DAL/DriverLayer/Control_TcpClient.cs @@ -224,6 +224,9 @@ /// <param name="bytes">闇�瑕佸彂閫佺殑瀛楄妭</param> public void SendMessage(byte[] bytes) { +#if __IOS__ + +#endif if (heartBeatLogIdList.Count > 3) { try @@ -240,6 +243,14 @@ } try { + if (_tcpClient == null) + { + return; + } + if (!_tcpClient.Connected) + { + return; + } if (_tcpClient.GetStream().CanWrite&& isConnected) { _tcpClient.GetStream().Write(bytes, 0, bytes.Length); -- Gitblit v1.8.0