MobileChromeApps / cordova-plugin-chrome-apps-sockets-udp

BSD 3-Clause "New" or "Revised" License
80 stars 40 forks source link

Setting TTL on Android has no effect #1

Open jontaylor opened 9 years ago

jontaylor commented 9 years ago

I have attempted to set the TTL to be higher than 1 but whatever I set it is always set at 1.

My research lead me to think this could be a java bug with having ipv4 and ipv6 on the system at the same time, which they suggest to fix with

        java.lang.System.setProperty("java.net.preferIPv4Stack", "true");
        java.lang.System.setProperty("java.net.preferIPv6Addresses", "false");

However this has no effect and the TTL remains at 1, no matter what I pass into setMulticastTimeToLive.

To make sure its not just an android bug I installing the Cling UDP demo app and that sets a TTL of 4, so it must be possible to have this work.

Many thanks for reading this.