Ejemplo n.º 1
1
        public bool CheckConnectionToClient()
        {
            _checkStep = ClientCheckStep.MsgrBasicTest;

            ///1. 8881로 데이터 보냄
            ///2. 8884가 응답받음

            ///3. 8883이 대기
            ///4. 8882로부터 수신
            ///5. 8882로 응답
            _socHandler.SendUDP(8882, serverIp, 8883, "8883전송테스트");

            //_checkStep = CheckStep.None;
            return true;
        }
Ejemplo n.º 2
0
        /// <summary>
        ///기본통신(UDP)
        ///  1. 클라이언트8884에서 최초 서버 8881로 보냄
        ///  2. 서버 8882에서 클라이언트 8883으로 받음
        ///  
        ///1. 8881로 데이터 보냄
        ///2. 8884가 응답받음
        ///3. 8883이 대기
        ///4. 8882로부터 수신
        ///5. 8882로 응답
        /// 
        /// </summary>
        /// <returns></returns>
        public bool CheckBasicConnection()
        {
            _checkStep = ClientCheckStep.MsgrBasicTest;

            ///1. 8881로 데이터 보냄
            ///2. 8884가 응답받음
            _socHandler.SendUDP(8884, serverIp, 8881, "8881전송테스트");

            ///3. 8883이 대기
            ///4. 8882로부터 수신
            ///5. 8882로 응답
            //ReceiveUDP(8883);

            //_checkStep = CheckStep.None;
            return true;
        }
Ejemplo n.º 3
0
        public bool SetMySqlFirewall()
        {
            MsgrLogger.WriteLog("MySql port 방화벽 등록...");
            _checkStep = ClientCheckStep.MySqlBasicTest;

            return _fwManager.AddPort(WEDO_MYQL_NAME, MYSQL_PORT, false);
        }
Ejemplo n.º 4
0
        public bool SetMsgrFirewall()
        {
            MsgrLogger.WriteLog("메신저방화벽 등록...");
            _checkStep = ClientCheckStep.MsgrFirewallCheck;

            return _fwManager.AddProgram(WEDO_CLIENT_NAME, WEDO_CLIENT);
        }
Ejemplo n.º 5
0
        public bool ReleaseMySqlFirewall()
        {
            MsgrLogger.WriteLog("MySql port 방화벽 등록해제...");
            _checkStep = ClientCheckStep.MySqlBasicTest;

            return _fwManager.RemovePort(MYSQL_PORT, false);
        }
Ejemplo n.º 6
0
        public bool ReleaseMsgrFirewall()
        {
            MsgrLogger.WriteLog("메신저방화벽 등록해제...");
            _checkStep = ClientCheckStep.MsgrFirewallCheck;

            return _fwManager.RemoveProgram(WEDO_CLIENT);
        }
Ejemplo n.º 7
0
        /// <summary>
        /// 방화벽 활성화/비활성화 확인
        /// </summary>
        /// <returns></returns>
        public bool IsFirewallEnabled()
        {
            MsgrLogger.WriteLog("방화벽 활성화 체크...");
            _checkStep = ClientCheckStep.MsgrFirewallCheck;

            string fwStatus = "";

            if (_fwManager.IsFirewallEnabled())
            {
                fwStatus = "방화벽활성화상태";
            }
            else
            {
                fwStatus = "방화벽비활성화상태";
            }
            MsgrLogger.WriteLog("===>"+fwStatus);
            return _fwManager.IsFirewallEnabled();
        }
Ejemplo n.º 8
0
        public string GetCompanyCd()
        {
            string result = null;
            _checkStep = ClientCheckStep.MySqlCompanyCdTest;
            try
            {
                OnWriteLog("회사코드 확인.");
                handler.Open();
                handler.SetQuery("select com_cd, com_nm from t_company");
                DataTable dt = null;
                dt = handler.DoQuery();

                foreach (DataRow dr in dt.Rows)
                {
                    result += dr["com_cd"].ToString() + ":" + dr["com_nm"].ToString();
                    OnWriteLog(string.Format("회사코드[{0}]회사명[{1}]", dr["com_cd"].ToString(), dr["com_nm"].ToString()));
                }
            }
            catch (Exception e)
            {
                OnWriteLog("회사코드 확인 에러 : " + e.ToString());
            }
            finally
            {
                handler.Close();
            }
            return result;
        }
Ejemplo n.º 9
0
        public string CheckMySqlFirewallStatus()
        {
            MsgrLogger.WriteLog("MySql 방화벽 체크중...");
            _checkStep = ClientCheckStep.MySqlBasicTest;

            return _fwManager.GetByPort(MYSQL_PORT);
        }
Ejemplo n.º 10
0
        public bool CheckMySqlConnection()
        {
            bool result = false;
            _checkStep = ClientCheckStep.MySqlBasicTest;
            try
            {
                OnWriteLog("MySql 서버 접속테스트...");
                _checkStep = ClientCheckStep.MySqlBasicTest;

                handler.Open();

                result = handler.Ping();
                if (result)
                {
                    OnWriteLog("MySql 서버 접속테스트 성공");
                }
                else
                {
                    OnWriteLog("MySql 서버 접속테스트 실패");
                }
            }
            catch (Exception e)
            {
                OnWriteLog("MySql 서버 접속테스트 에러 : " + e.ToString());
            }
            finally
            {
                handler.Close();
            }
            return result;
        }
Ejemplo n.º 11
0
        //클라이언트 방화벽 확인
        //1. WDMsg_Client.exe
        //2. 각종유틸
        // ==> 상태확인
        public string CheckMsgrFirewallStatus()
        {
            MsgrLogger.WriteLog("메신저방화벽 체크중...");
            _checkStep = ClientCheckStep.MsgrFirewallCheck;

            return _fwManager.GetByProgramPath(WEDO_CLIENT);
        }
Ejemplo n.º 12
0
        //헬스체크(UDP)
        //  클라이언트 8886에서 서버 8885로 보냄
        public string CheckHealthConnection()
        {
            //1. 8885로 데이터보냄
            //2. 8886이 응답받음
            _checkStep = ClientCheckStep.MsgrHealthCheck;
            _socHandler.SendUDP(8886, serverIp, 8885, "8885전송테스트");

            string result = "";
            //_checkStep = CheckStep.None;
            return result;
        }
Ejemplo n.º 13
0
        //파일전송(TCP)
        //  클라이언  -> 서버 9001
        //  클라이언트 -> 클라이언트 9002, 9004
        public string CheckFTPConnection()
        {
            //1. 9001서버로 전송
            //2. 결과받음
            //3. 9004 다른 클라이언트로 전송
            //4. 결과받음
            //5. 9002로 대기
            //6. 결과받음
            //7.
            _checkStep = ClientCheckStep.MsgrFTPTest;

            _socHandler.SendTCP(serverIp, 9001, "9001전송테스트", true);
            string result = "";
            //_checkStep = CheckStep.None;
            return result;
        }
Ejemplo n.º 14
0
 //CRM관련통신(TCP)
 //  CRM->서버 8886
 public string CheckCRMConnection()
 {
     //tcp소켓생성
     //8886으로 전송
     //결과확인
     _checkStep = ClientCheckStep.MsgrCRMTest;
     _socHandler.SendTCP(serverIp, 8886, "22&01055554444&0001&0001&20130901&010101&CRM테스트", false);//22&ani&senderID&receiverID&일자&시간&CustomerName
     string result = "";
     //_checkStep = CheckStep.None;
     return result;
 }