Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Can WWW support IPV6?

Discussion in 'Multiplayer' started by albertleon, Jun 6, 2016.

  1. albertleon

    albertleon

    Joined:
    Jun 6, 2016
    Posts:
    9
    My wifi address is: a8:8e:24:a3:f9:6f
    Obviously, My ipaddress is ipv6.
    In this case,my code cannot work,the code is:

    WWW www=new WWW(" http://i4center-ws.foxugame.com:8090/serverlist?format=json&ver=1.2");
    StartCoroutine(WaitForComplete(www));

    the coroutine is:
    IEnumerator<WWW>WaitForComplete(WWWwww)
    {
    yield return www;
    if(www.isDone)
    {
    Debug.Log("www.text is:"+www.text);
    ......
    }}
    The result of Debug is null, www.text is empty!!

    When I change my ipaddress to ipv4(I change to connect another wifi), www.text has value that I want.
    How can we make WWW to support ipv6? Thank you for responding me!!!
     
  2. orb

    orb

    Joined:
    Nov 24, 2010
    Posts:
    3,032
    I can't ping6 that address. Web-based IP-lookup tools say it's not a valid IPv6 address. Who supplied that address to you?
     
  3. albertleon

    albertleon

    Joined:
    Jun 6, 2016
    Posts:
    9
  4. orb

    orb

    Joined:
    Nov 24, 2010
    Posts:
    3,032
    I'm talking about a8:8e:24:a3:f9:6f. There's no response from that, and it doesn't follow what seems to be the common format (20xx for the first segment). Errors are "unknown host" and "name or service not known".
     
  5. albertleon

    albertleon

    Joined:
    Jun 6, 2016
    Posts:
    9
  6. orb

    orb

    Joined:
    Nov 24, 2010
    Posts:
    3,032
    Ah, looks like it's a case of your router not bridging IPv4 to IPv6 then. For that website to be reachable through a pure IPv6 network you either need an IPv6 (AAAA record) for its domain, or a method to forward IPv4 networks. Most of the Internet still wouldn't be reachable through pure IPv6, and most of the ones which are still only have IPv4 DNS servers, which means you need bridging no matter what.
     
  7. albertleon

    albertleon

    Joined:
    Jun 6, 2016
    Posts:
    9
    But I can access the url in browser! Why can not I use WWW to get its content???
     
  8. albertleon

    albertleon

    Joined:
    Jun 6, 2016
    Posts:
    9
    By the way, the version of my unity is: 5.3.5f1, personal, the latest one!
     
  9. orb

    orb

    Joined:
    Nov 24, 2010
    Posts:
    3,032
    If it works from your browser you may actually have found a Unity bug, unless the browser is being tricky and using its own DNS methods (like Safari seems to do). I'd package up a tiny test project that exhibits the problem and send a bug report to UT.
     
  10. albertleon

    albertleon

    Joined:
    Jun 6, 2016
    Posts:
    9
    My computer is mini MAC. I do use Safari to visit the url!
     
  11. albertleon

    albertleon

    Joined:
    Jun 6, 2016
    Posts:
    9
    Ah, I made a mistake, my ipaddress is: 2001:2::aab1:aa8e:24ff:fea3:f96f, anyway, it's still a ipv6!
     
  12. orb

    orb

    Joined:
    Nov 24, 2010
    Posts:
    3,032
    OK, try a different browser while in pure IPv6 mode. If every browser gets out, I would blame Unity :)
     
  13. albertleon

    albertleon

    Joined:
    Jun 6, 2016
    Posts:
    9
    I used a new browser named as Maxthon, I still can access the url!!!!
     
  14. orb

    orb

    Joined:
    Nov 24, 2010
    Posts:
    3,032
    They had a recent blog post about IPv6 support, saying it was ready (or soon to be) on all desktop platforms, iOS and Android, so there shouldn't be issues like these. Maybe time to blame Unity :/

    Also check the status codes you're getting from the web requests. Those are handy in a bug report.
     
  15. albertleon

    albertleon

    Joined:
    Jun 6, 2016
    Posts:
    9
    I not only test the code in editor mode, but also on iPad mini2. Both of them show the same result!
     
  16. Mantas-Puida

    Mantas-Puida

    Unity Technologies

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    Could you please submit a bug report with detailed description of your networking setup and sample code you are using to test. Thanks!