pwittchen / ReactiveNetwork

Android library listening network connection state and Internet connectivity with RxJava Observables
http://pwittchen.github.io/ReactiveNetwork/docs/RxJava2.x/
Apache License 2.0
2.53k stars 276 forks source link

ReactiveNetwork(RN) usage of IPv6 and DNS results prioritization #465

Open yifeifiona opened 1 year ago

yifeifiona commented 1 year ago

Hi, I would like to understand RN usage on IPv4 and IPv6 since I can't find in any documentation regarding this. More specifically, I would like to know:

The goal is to prioritize the use of IPv4 since it provides a more stable experience.

Any information will be appreciated! Thanks,

pwittchen commented 1 year ago

Hi @yifeifiona,

RN library does not have any low-level code regarding prioritization of IPv6 over IPv4 or the other way around. Inside the library, in the internet.observing package, for verifying Internet connectivity, I'm using java.net.Socket, java.net.HttpURLConnection or javax.net.ssl.HttpsURLConnection depending on the chosen strategy. Java/Android handles other things related to this connectivity verification (probably IP prioritization too). In order, to implement such prioritization within the library, more research needs to be done. Any suggestions or PRs are appreciated. Nevertheless, I need to find some time to do more updates in this project :).

Regards, Piotr