Exemplo n.º 1
0
 public void RemoveRequestByUser(string url)
 {
     if (CurRequesting.httpInfo.m_srcUrl.Equals(url))
     {
         CurRequesting.CancelDownload();
         CurRequesting = null;
         isDowning     = false;
     }
     RemoveRequest(url);
 }
Exemplo n.º 2
0
 public void AddRequest(string url, HttpBase httpData)
 {
     if (URLToHttpBase.ContainsKey(url))
     {
         URLToHttpBase[url] = httpData;
     }
     else
     {
         URLToHttpBase.Add(url, httpData);
     }
 }
Exemplo n.º 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);
         }
     }
 }
Exemplo n.º 4
0
 public void RemoveAndFinish(string url)
 {
     RemoveRequest(url);
     CurRequesting = null;
     isDowning     = false;
 }