- Home /
 
 
               Question by 
               Catdrinkingacat · Apr 08, 2021 at 04:33 PM · 
                c#networkingienumerator  
              
 
              Check every 3 seconds if the server side processing is done
Hello! I have an IENumerator that reads a link. There is a few server side process that will be done when the link is opened. It may take 2.5~5 seconds to complete. How do I recheck the link until the html contains the word "Done"?
My current code:
 IEnumerator MakeData()
 {
     using (UnityWebRequest www1 = UnityWebRequest.Get(link))
     {
         yield return www1.Send();
         if (www1.isNetworkError || www1.isHttpError)
         {
             Debug.Log(www1.error);
         }
         else
         {
             string tt = "working";
             while (tt.Contains("working"))
             {
                 yield return new WaitForSeconds(3);
                 //how do I get new updated html?
                 tt = html after 3 seconds;
             }
             if (tt.Contains("Done")) { Process(); }
         }
         www1.Dispose();
     }
 }
 
              
               Comment
              
 
               
              Your answer
 
             Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
Multiple Cars not working 1 Answer
NetworkManager.OnServerDisconnect not being called 2 Answers