コード例 #1
0
        } // OnTimeOut

        protected void RestartTransaction(Transaction transaction)
        {
            this.UpdateTransactionTry(transaction.id);
            this.SetTransactionStatus(transaction.id, transactionStatus.needResend);
            this.SetTransactionStartTime(transaction.id, Ucss.Common.GetSeconds());

            HTTPRequest request = (HTTPRequest)transaction.request;

            StopCoroutine(request.coroutine);
            transaction.www.Dispose();
            this.SetTransactionWWW(transaction.id, null);
            request.coroutine = StartCoroutine(request.coroutineFactory());
        } // RestartTransaction
コード例 #2
0
        public string GetMovie(string url, EventHandlerMovieTexture movieCallback, EventHandlerServiceError onError = null, EventHandlerServiceTimeOut onTimeOut = null, int timeOut = 0)
        {
            HTTPRequest request = new HTTPRequest();

            request.url                  = url;
            request.transactionId        = UCSS.GenerateTransactionId(Common.Md5Sum(url));
            request.movieTextureCallback = movieCallback;
            request.onError              = onError;
            request.onTimeOut            = onTimeOut;
            request.timeOut              = timeOut;

            request.coroutineFactory = RunGetDataCoroutineFactory(request);
            request.coroutine        = StartCoroutine(request.coroutineFactory());
            return(request.transactionId);
        }
コード例 #3
0
        public string PostForm(string url, WWWForm formData, EventHandlerHTTPBytes bytesCallback, EventHandlerServiceError onError = null, EventHandlerServiceTimeOut onTimeOut = null, int timeOut = 0)
        {
            HTTPRequest request = new HTTPRequest();

            request.url           = url;
            request.formData      = formData;
            request.transactionId = UCSS.GenerateTransactionId(Common.Md5Sum(url));
            request.bytesCallback = bytesCallback;
            request.onError       = onError;
            request.onTimeOut     = onTimeOut;
            request.timeOut       = timeOut;

            request.coroutineFactory = RunPostFormCoroutineFactory(request);
            request.coroutine        = StartCoroutine(request.coroutineFactory());
            return(request.transactionId);
        }
コード例 #4
0
        public string PostBytes(string url, byte[] bytes, Dictionary <string, string> headers, EventHandlerHTTPString stringCallback, EventHandlerServiceError onError = null, EventHandlerServiceTimeOut onTimeOut = null, int timeOut = 0)
        {
            HTTPRequest request = new HTTPRequest();

            request.url            = url;
            request.bytes          = bytes;
            request.headers        = headers;
            request.transactionId  = UCSS.GenerateTransactionId(Common.Md5Sum(url));
            request.stringCallback = stringCallback;
            request.onError        = onError;
            request.onTimeOut      = onTimeOut;
            request.timeOut        = timeOut;

            request.coroutineFactory = RunPostBytesCoroutineFactory(request);
            request.coroutine        = StartCoroutine(request.coroutineFactory());
            return(request.transactionId);
        }
コード例 #5
0
        // *** END post bytes ***

        // *** POST FORM ***
        public void PostForm(HTTPRequest request)
        {
            request.coroutineFactory = RunPostFormCoroutineFactory(request);
            request.coroutine        = StartCoroutine(request.coroutineFactory());
        }
コード例 #6
0
        // *** END AudioClip ***

        // *** Movie ***
#if UNITY_PRO_LICENSE && !UNITY_WEBGL
        public void GetMovie(HTTPRequest request)
        {
            request.coroutineFactory = RunGetDataCoroutineFactory(request);
            request.coroutine        = StartCoroutine(request.coroutineFactory());
        }
コード例 #7
0
 public void GetAssetBundleOrCache(HTTPRequest request)
 {
     request.coroutineFactory = RunGetAssetBundleCoroutineFactory(request);
     request.coroutine        = StartCoroutine(request.coroutineFactory());
 }