WWW - HttpWebRequest - TcpClient ?

Hi

UnityEngine.WWW is nice and easy to use but has a low (fixed?) timeout and I get always a empty response.
So now I have a loop of

download = new UnityEngine.WWW(command);
yield return download;
...
yield return new WaitForSeconds(1.0f);

but I don’t like it because it make 20-30 calls to get something.

Another solution is using a WebRequest, it works perfectly in a stand alone but in the webplayer the instruction

httpRequest = (HttpWebRequest)WebRequest.Create(post_url);

raise a security exception.

The last solution is TcpClient class… but I discovered it’s not working if there is a proxy.

Anyone know a way to set the timeout to WWW class or a way to create the WebRequest in the webplayer?

This probably doesn’t matter to you, but it’s good to know. I’ve been told that the issue if fixed in Unity 2.0 and OTEE will fix it in 1.6.2 after 2.0 is released. Apparently, with many servers it works fine in 1.6.2, but in many (including mine and yours) it does not. Sorry this doesn’t answer your question, but hopefully someone will find that info useful.

Check this thread for a (annoying) solution. I stopped needing a solution immediately so I didn’t follow up completely.

(This seems to be a common problem lately with several threads popping up, but for some reason the search won’t find “WWW” in threads, so it’s harder to find previous threads about it.)

The WWW class is still not working behind a proxy.
Anyone knows if it’s possible to set the proxy for the WWW class to
GetSystemWebProxy?