/// <summary> /// 以 WWW 方式加载网络非ab资源 /// </summary> /// <param name="req"></param> /// <param name="coroutine"></param> /// <returns></returns> static public void HttpWebRequest(CRequest req) { HttpWebRequestOperation op = HttpWebRequestOperation.Get(); op.SetRequest(req); inProgressOperations.Add(op); op.BeginDownload(); }
/// <summary> /// 以 WWW 方式加载网络非ab资源 /// </summary> /// <param name="url"></param> /// <param name="head"></param> /// <param name="type"></param> /// <returns></returns> static public HttpLoadOperation HttpWebRequestCoroutine(string url, WebHeaderCollection head, System.Type type) { var req = CRequest.Get(); req.vUrl = url; req.head = head; req.assetType = type; HttpWebRequestOperation op = new HttpWebRequestOperation(); req.assetOperation = op; op.SetRequest(req); inProgressOperations.Add(op); op.BeginDownload(); return(op); }
public static void Release(HttpWebRequestOperation toRelease) { webOperationPool.Release(toRelease); }
private static void m_ActionOnRelease(HttpWebRequestOperation op) { op.Reset(); op.httpIsDone = false; }
private static void m_ActionOnGet(HttpWebRequestOperation op) { op.pool = true; }