From cbc156bc38d8b8eae7aef60cb186ab2b52fa701f Mon Sep 17 00:00:00 2001 From: wxr <wxr@hdlchina.com.cn> Date: 星期二, 16 七月 2024 13:59:56 +0800 Subject: [PATCH] 增加全部挂断 --- HDL_ON/DAL/DriverLayer/Control_TcpClient.cs | 22 ++++++++++++++-------- 1 files changed, 14 insertions(+), 8 deletions(-) diff --git a/HDL_ON/DAL/DriverLayer/Control_TcpClient.cs b/HDL_ON/DAL/DriverLayer/Control_TcpClient.cs index 53d4457..84e305b 100644 --- a/HDL_ON/DAL/DriverLayer/Control_TcpClient.cs +++ b/HDL_ON/DAL/DriverLayer/Control_TcpClient.cs @@ -130,6 +130,7 @@ /// </summary> public void Connect() { + return; lock (lockObj) { if (isConnected) @@ -224,14 +225,10 @@ /// <param name="bytes">闇�瑕佸彂閫佺殑瀛楄妭</param> public void SendMessage(byte[] bytes) { - if(_tcpClient == null) - { - return; - } - if (!_tcpClient.Connected) - { - return; - } + return; +#if __IOS__ + +#endif if (heartBeatLogIdList.Count > 3) { try @@ -248,6 +245,14 @@ } try { + if (_tcpClient == null) + { + return; + } + if (!_tcpClient.Connected) + { + return; + } if (_tcpClient.GetStream().CanWrite&& isConnected) { _tcpClient.GetStream().Write(bytes, 0, bytes.Length); @@ -266,6 +271,7 @@ private DateTime heartBeatTime; public void HeartBeat() { + return; lock (lockObj) { if (heartBeatThread == null) -- Gitblit v1.8.0