- Home /
 
delay sending http data with no answer
I neet to send some commands to a video server, the final URI is something like:
http://10.10.10.10/cgi-bin/fwsysget.cgi?FwModId=0&FwCgiVer=0x0001
I have a coroutine:
//Command is the full URI
 public IEnumerator cam (string command){
 float starttime = Time.realtimeSinceStartup;
 WWW www = new WWW (command);
 
 while(!www.isDone && (Time.realtimeSinceStartup - starttime <5)){
 yield return null;
 }
 www.Dispose();
 
 UnityEngine.Debug.Log ("Finished " + command + " at " + (Time.realtimeSinceStartup - starttime).ToString("F2"));
 }
 
               My problem is that the coroutine takes 3 seconds to return, and my command takes also 3 seconds to be received by the web server. The server doesn't send any answer. If I copy-paste the same URL in chrome, the answer is instantaneous.
Am I doing something wrong by using the WWW class? Should I use WebRequest with POST, or the wwwForm class?
Thanks
Your answer
 
             Follow this Question
Related Questions
Where to continue in Response/request? 0 Answers
How to make an HTTP request in a menu item ? 2 Answers
System.Threading.Thread use causing error on player exit in OSX 1 Answer
Download 6 textures from the web, create a cubemap and set it as skybox in runtime 0 Answers
Why do I get Parse error (code 400) from Google Ftiness API in Unity? 0 Answers