From 98ceb6bd2021f9ff136cda27eef28676dd7b5d92 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期四, 21 五月 2020 13:24:02 +0800 Subject: [PATCH] 最后的版本 --- ZigbeeApp/Shared/Phone/ZigBee/Common/Application.cs | 35 ----------------------------------- 1 files changed, 0 insertions(+), 35 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Common/Application.cs b/ZigbeeApp/Shared/Phone/ZigBee/Common/Application.cs index c446b42..367c79d 100755 --- a/ZigbeeApp/Shared/Phone/ZigBee/Common/Application.cs +++ b/ZigbeeApp/Shared/Phone/ZigBee/Common/Application.cs @@ -391,45 +391,10 @@ { try { - //妫�娴嬭繛鎺ョ姸鎬� - CheckConnectiton(); - Start(7624); busSocket.BeginSendTo(bytes, 0, bytes.Length, SocketFlags.None, iPEndPoint, new AsyncCallback(asyncEndSend), null); } catch { } - } - - /// <summary> - /// 妫�娴嬭繛鎺ョ姸鎬� - /// </summary> - private static void CheckConnectiton() - { - if (busSocket == null) { return; } - - bool blockingState = busSocket.Blocking; - try - { - byte[] tmp = new byte[1]; - - busSocket.Blocking = false; - busSocket.Send(tmp, 0, 0); - //tcp杩樺湪杩炴帴鐫� - busSocket.Blocking = blockingState; - } - catch (SocketException e) - { - // 10035 == WSAEWOULDBLOCK - if (e.NativeErrorCode.Equals(10035)) - { - //Still Connected, but the Send would block - } - else - { - //tcp宸茬粡鏂紑浜嗚繛鎺� - Stop(); - } - } } /// <summary> -- Gitblit v1.8.0