Beispiel #1
0
        /// <summary>
        /// 断开
        /// </summary>
        public static async Task Deauthenticate()
        {
            NetworkCheck.StopCheck();
            await HeartBeatProxy.Kill();

            PPPoE.Hangup();
        }
Beispiel #2
0
 private static bool MakeHeartbeat(string ipmsg)
 {
     if (HeartBeatProxy.Init() != HeartBeatProxy.HeadBeatStatus.Success)
     {
         Log4Net.WriteLog("初始化心跳失败");
         ViewModel.Binder.BaseBinder.ShowStatus("初始化心跳失败");
     }
     else
     {
         HeartBeatProxy.HeadBeatStatus stat = HeartBeatProxy.Heartbeat();
         if (stat == HeartBeatProxy.HeadBeatStatus.Success)
         {
             ViewModel.Binder.BaseBinder.ShowStatus($"认证成功,IP: {ipmsg}");
             return(true);
         }
         else
         {
             Log4Net.WriteLog("心跳失败");
             ViewModel.Binder.BaseBinder.ShowStatus("心跳失败");
         }
     }
     return(false);
 }