- Home /
Issue with WWW-Class' slow response time
I've some troubles finding the reason why my WWW-Request take so long
WWW www = new WWW(Url);
StartCoroutine(WaitForRequest(www));
private IEnumerator WaitForRequest(WWW www)
{
Debug.Log("instant...");
yield return www;
Debug.Log("...5 seconds later");
if (www.error == null)
ParseResponse(www.text);
else
Debug.Log("WWW Error:\n" + www.error);
}
I just made a simple Call to my php-server (which response within milliseconds to requests made via browser) and it took about 5 seconds everytime until i get the data.
Is this the normal behavior of the WWW-class or is it possible to accelerate the response time?
Answer by RustForge · Feb 03, 2014 at 07:41 AM
The problem is caused by multiple network adapter.
unity seems to go through each one (every single request) until it got a response.
Recovering a post almost year and a half old, with Unity 5.
I'm seeing the very same problem. I have a super slow answer from the WWW class (3 seconds or so) in a multiple NIC system from a server in my local network. Is this a known issue with multiple NICs?
Answer by adrian0s · Feb 19, 2018 at 08:26 AM
Use the .Net method instead, it should cut down the response time in half.
http://www.codingvision.net/networking/c-sending-data-using-get-or-post