Esempio n. 1
0
 /// <summary>
 /// 断开连接
 /// </summary>
 public void StopConnection()
 {
     HeartTimeStop();
     receiveThread.Abort();
     //缺少对receive是否完成的判断
     receiveThread = new Thread(ReceiveHandle)
     {
         IsBackground = true
     };
     tcpSocket.DisconnectServer();
     Log.log.Debug("StopConnection success");
     online = false;
     Log.log.Debug("exit");
 }
Esempio n. 2
0
 /// <summary>
 /// 断开连接
 /// </summary>
 public void StopConnection()
 {
     online = false;
     ack    = 0;
     RecHeartTimerStop();
     SendHeartTimerStop();
     receiveThread.Abort();
     //缺少对receive是否完成的判断
     receiveThread = new Thread(ReceiveHandle)
     {
         IsBackground = true
     };
     tcpSocket.DisconnectServer();
     Log.log.Info("StopConnection success");
 }