Exemplo n.º 1
0
        private IEnumerator doWebRequest(ITransfluentParameters call, GotstatusUpdate onStatusDone)
        {
            var facade = new WWWFacade();
            var sw     = new Stopwatch();

            sw.Start();
            WWW www = facade.request(call);

            yield return(www);

            var status = new WebServiceReturnStatus {
                serviceParams = call
            };

            try
            {
                status = facade.getStatusFromFinishedWWW(www, sw, call);
            }
            catch (CallException e)
            {
                Debug.Log("Exception:" + e.Message);
            }

            if (onStatusDone != null)
            {
                runner.runRoutine(onStatusDone(status));
            }
        }
Exemplo n.º 2
0
        private IEnumerator doWebRequest(ITransfluentParameters call, GotstatusUpdate onStatusDone)
        {
            var facade = new WWWFacade();
            var sw = new Stopwatch();
            sw.Start();
            WWW www = facade.request(call);

            yield return www;
            var status = new WebServiceReturnStatus { serviceParams = call };
            try
            {
                status = facade.getStatusFromFinishedWWW(www, sw, call);
            }
            catch(CallException e)
            {
                Debug.Log("Exception:" + e.Message);
            }

            if(onStatusDone != null)
            {
                runner.runRoutine(onStatusDone(status));
            }
        }