Ejemplo n.º 1
0
        public AgentCommand requestAgentCommand()
        {
            Dictionary <string, string> queryParams = new Dictionary <string, string>();

            queryParams.Add("client_ip", getLocalIPAddress());

            string urlPath = PcbAgent.buildUriForApiRequest(PcbAgent.REQUEST_AGENT_COMMAND);

            string result = HttpSender.requestNormal(urlPath, "GET", queryParams);

            Console.WriteLine("[requestAgentCommand] requestAgentCommand result:{0}", result);

            AgentCommand agentCmd = MsgConverter.unpack <AgentCommand>(result);

            return(agentCmd);
        }
Ejemplo n.º 2
0
        public string sendPcbGamePatchToMaster(PcbGamePatch pcbGamePatch)
        {
            if (pcbGamePatch == null)
            {
                return("pcbGamePatch is null!");
            }
            if (pcbGamePatch.pcbGames.Count == 0)
            {
                return("pcbGamePatch.pcbGames is empty!");
            }

            string urlPath = PcbAgent.buildUriForApiRequest(PcbAgent.REQUEST_GAME_PATCH + getLocalIPAddress());

            Console.WriteLine("[sendPcbGamePatchToMaster] pcbGamePatch result:{0}", MsgConverter.pack <PcbGamePatch>(pcbGamePatch));

            return(HttpSender.requestJson(urlPath, MsgConverter.pack <PcbGamePatch>(pcbGamePatch)));
        }
Ejemplo n.º 3
0
        public bool checkGamePatchPass()
        {
            Dictionary <string, string> queryParams = new Dictionary <string, string>();

            queryParams.Add("client_ip", getLocalIPAddress());

            string urlPath = PcbAgent.buildUriForApiRequest(PcbAgent.REQUEST_PRECHECK);

            string result = HttpSender.requestNormal(urlPath, "GET", queryParams);

            Console.WriteLine("[checkGamePatchPass] checkGamePatchPass result:{0}", result);

            if ("CHECK".Equals(result))
            {
                return(false);
            }

            //통신 오류가 발생해도 GamePatch check 를 pass 시킨다.
            return(true);
        }