/// <summary>
        ///     新的子线程:接收当前Socket的数据
        /// </summary>
        private void ReceiveData(object sender, SerialDataReceivedEventArgs e) //接收数据
        {
            var buffer = new byte[1024];

            Thread.Sleep(100);
            int bufLen;

            try
            {
                bufLen = _comm.BytesToRead;
                if (bufLen == 0)
                {
                    return;
                }
                _comm.Read(buffer, 0, bufLen);
            }

            catch (InvalidOperationException ex)
            {
                _commucationFacade.CommClientFailed("串口接收数据异常");
                Debug.WriteLine("客户端串口断开连接");
                Debug.WriteLine("错误代码:" + ex.Message);
                return;
            }

            var replyData = new byte[bufLen];

            Array.Copy(buffer, 0, replyData, 0, bufLen);
            _commucationFacade.GetReceivedData(replyData); //返回接收到的byte[]
        }
        /// <summary>
        ///     新的子线程:接收当前Socket的数据
        /// </summary>
        private void ReceiveData() //接收数据
        {
            var buffer = new byte[1024];

            //根据收听到的客户端套接字向客户端发送信息
            while (true)
            {
                Thread.Sleep(50);
                //在套接字上接收客户端发送的信息
                int bufLen;
                try
                {
                    bufLen = _socketTcp.Available;
                    if (bufLen == 0)
                    {
                        continue;
                    }
                    _socketTcp.Receive(buffer, 0, bufLen, SocketFlags.None);
                }
                catch (Exception ex)
                {
                    _commucationFacade.CommClientFailed("Socket接收数据异常");
                    Debug.WriteLine("已与TCP客户端断开连接");
                    Debug.WriteLine("服务端接收链接中断:" + ex.Message);
                    return;
                }

                var replyData = new byte[bufLen];
                Array.Copy(buffer, 0, replyData, 0, bufLen);
                _commucationFacade.GetReceivedData(replyData); //返回接收到的byte[]
            }
        }