void 관리서버에_허트비트_보내기() { if (관리서버와연결중인가()) { SendMessages.관리서버에_허트비트_보내기(); } }
public void 관리서버로부터_SVN_패치() { CommonLib.DevLog.Write(string.Format("SVN 패치 요청 받음. 위치"), CommonLib.LOG_LEVEL.INFO); if (AppServerInfo.AppServerProcess != null) { CommonLib.DevLog.Write(string.Format("App서버가 실행 중이므로 SVN 업데이트 실패"), CommonLib.LOG_LEVEL.ERROR); return; } var result = SVNManage.Update(AppServerInfo.AppServerFullPathDir); SendMessages.관리서버에_SVNUpdate결과_보내기(result); }
public bool ProcessIPCMessage(bool 관리서버와연결중인가, Tuple <short, string> packet) { if (packet == null) { return(false); } switch ((IPCAppServer.IPC_MSG_TYPE)packet.Item1) { case IPCAppServer.IPC_MSG_TYPE.RESPONSE_HEALTH_CHECK: { try { var resData = Newtonsoft.Json.JsonConvert.DeserializeObject <IPCAppServer.IPCMsgReSponseHealthCheck>(packet.Item2); if (관리서버와연결중인가) { SendMessages.관리서버에_App서버_상태통보(resData.CurrentDateTime, resData.CurUserCount); } IPCAppServer.CheckAppServerStatus.SendMessageToHostProgram(CommonLib.InnerMsgType.APP_SERVER_STATUS_COMMUNICATE, "AppServer 통신 성공"); var message = string.Format("[ProcessIPCMessage] AppServer 통신 성공. UserCount:{0}", resData.CurUserCount); CommonLib.DevLog.Write(message, CommonLib.LOG_LEVEL.INFO); } catch (Exception ex) { var message = string.Format("[ProcessIPCMessage] Exception:{0}", ex.ToString()); CommonLib.DevLog.Write(message, CommonLib.LOG_LEVEL.ERROR); var jsonMsg = string.Format("[ProcessIPCMessage] Exception. Json:{0}", packet.Item2); CommonLib.DevLog.Write(jsonMsg, CommonLib.LOG_LEVEL.ERROR); } } break; default: { if (packet.Item1 == ProcessCommunicate.ProcessCommu.IPC_NETWORK_ERROR) { CommonLib.DevLog.Write(packet.Item2, CommonLib.LOG_LEVEL.ERROR); } } break; } return(true); }
public void Init(bool isEnableInnerMsg, string serverAddress, AppServerConfig appServerConfig, IPCCommuConfig ipcConfig) { CommonLib.InnerMessageManager.SetEnable(isEnableInnerMsg); MyIP = appServerConfig.IPAddress; AppServerInfo.App서버_정보_설정(appServerConfig); hubConnection = new HubConnection(serverAddress); RegistHubProxy(hubConnection); SendMessages.Init(agentHubProxy); IPCCommu.Init(ipcConfig.MyPort, ipcConfig.OtherPort, ipcConfig.MaxPacketSize, ipcConfig.MaxPacketBufferSize); IPCCommu.InitClient(appServerConfig.AppServerName); ComputerStatus.Init(); }
// 접속 public bool Connect() { try { if (관리서버와연결중인가()) { return(false); } // 접속 시작 hubConnection.Start().Wait(); SendMessages.관리서버에_Agent정보통보(); } catch (Exception ex) { CommonLib.DevLog.Write(ex.ToString(), CommonLib.LOG_LEVEL.TRACE); return(false); } return(true); }