private static void Tcp_OnMessage(object sender, ClientMessageEventArgs e)
 {
     //Logger.SysLog(e.RawString, "通讯记录");
     try
     {
         Console.WriteLine($"来自服务器:{e.RawString}");
         MinerCallBack.Exec(e);
     }
     catch (ActionNotRegException ex)
     {
         Console.WriteLine($"读取数据发生异常:{ex.Message}\n{e.RawString}");
     }
 }
 private static void MinerCallBackInit()
 {
     MinerCallBack.Init();
     MinerCallBack.RegCallback(TcpMessageEnum.MsgHeartBeat, MinerCallBack_MsgHeartBeat);
     MinerCallBack.RegCallback(TcpMessageEnum.CmdSetClientName, MinerCallBack_CmdSetClientName);
     MinerCallBack.RegCallback(TcpMessageEnum.CmdSynInit, MinerCallBack_CmdSynInit);
     MinerCallBack.RegCallback(TcpMessageEnum.CmdServerRun, MinerCallBack_CmdServerRun);
     MinerCallBack.RegCallback(TcpMessageEnum.MsgSynFileList, MinerCallBack_MsgSynFileList);
     MinerCallBack.RegCallback(TcpMessageEnum.CmdTransferFile, MinerCallBack_CmdTransferFile);
     MinerCallBack.RegCallback(TcpMessageEnum.CmdModefyTargetUrl, MinerCallBack_CmdModefyTargetUrl);
     MinerCallBack.RegCallback(TcpMessageEnum.CmdReRasdial, MinerCallBack_CmdReRasdial);
     MinerCallBack.RegCallback(TcpMessageEnum.CmdStartNewProgram, MinerCallBack_CmdStartNewProgram);
     MinerCallBack.RegCallback(TcpMessageEnum.CmdSubClose, MinerCallBack_CmdSubClose);
     MinerCallBack.RegCallback(TcpMessageEnum.MsgSynSession, MinerCallBack_MsgSynSession);
     MinerCallBack.RegCallback(TcpMessageEnum.CmdServerRunSchedule, MinerCallBack_CmdServerRunSchedule);
 }