/// <summary>
 ///     进行心跳操作
 /// </summary>
 public static HeadBeatStatus Heartbeat()
 {
     try
     {
         HeartbeatThread = Task.Factory.StartNew(() =>
         {
             HeartbeatExitCode = GDUT_Drcom.auth();
         });
         return(HeadBeatStatus.Success);
     }
     catch
     {
         return(HeadBeatStatus.Unknown);
     }
 }
 /// <summary>
 ///     初始化心跳包
 /// </summary>
 public static HeadBeatStatus Init()
 {
     try
     {
         string keep_alive1_flag = "6a\0";
         string log = ".\\gdut-drcom.log\0";
         GDUT_Drcom.set_enable_crypt(1);
         GDUT_Drcom.set_remote_ip(DialerConfig.AuthIP, DialerConfig.AuthIP.Length);
         GDUT_Drcom.set_keep_alive1_flag(keep_alive1_flag, keep_alive1_flag.Length);
         GDUT_Drcom.set_log_file(log, log.Length);
         return(HeadBeatStatus.Success);
     }
     catch (Exception e)
     {
         Log4Net.WriteLog(e.Message, e);
         return(HeadBeatStatus.Unknown);
     }
 }