コード例 #1
0
 public void RemoveRequestByUser(string url)
 {
     if (CurRequesting.httpInfo.m_srcUrl.Equals(url))
     {
         CurRequesting.CancelDownload();
         CurRequesting = null;
         isDowning     = false;
     }
     RemoveRequest(url);
 }
コード例 #2
0
 public void AddRequest(string url, HttpBase httpData)
 {
     if (URLToHttpBase.ContainsKey(url))
     {
         URLToHttpBase[url] = httpData;
     }
     else
     {
         URLToHttpBase.Add(url, httpData);
     }
 }
コード例 #3
0
 IEnumerator SendRequstFromList()
 {
     while (true)
     {
         if (!isDowning && URLToHttpBase.Count > 0)
         {
             List <string> urls = new List <string>(URLToHttpBase.Keys);
             AFLogger.d("请求URL为:" + urls[0]);
             CurRequesting = URLToHttpBase[urls[0]];
             CurRequesting.StartWebRequest();
             isDowning = true;
         }
         else
         {
             yield return(null);
         }
     }
 }
コード例 #4
0
 public void RemoveAndFinish(string url)
 {
     RemoveRequest(url);
     CurRequesting = null;
     isDowning     = false;
 }