} // 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
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); }
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); }
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); }
// *** END post bytes *** // *** POST FORM *** public void PostForm(HTTPRequest request) { request.coroutineFactory = RunPostFormCoroutineFactory(request); request.coroutine = StartCoroutine(request.coroutineFactory()); }
// *** END AudioClip *** // *** Movie *** #if UNITY_PRO_LICENSE && !UNITY_WEBGL public void GetMovie(HTTPRequest request) { request.coroutineFactory = RunGetDataCoroutineFactory(request); request.coroutine = StartCoroutine(request.coroutineFactory()); }
public void GetAssetBundleOrCache(HTTPRequest request) { request.coroutineFactory = RunGetAssetBundleCoroutineFactory(request); request.coroutine = StartCoroutine(request.coroutineFactory()); }