jamesmontemagno / Xamarin.Plugins

Cross-platform Native API Access from Shared Code!
MIT License
1.3k stars 380 forks source link

IsRemoteReachable always fails on an IPv4 network, however IPv6 is ok (iOS) #343

Closed gviddy closed 8 years ago

gviddy commented 8 years ago

Which Plugin does this impact: Connectivity <- fill in here

Please fill out either the bug or feature request section and remove whatever section you are not using.

Bug

Version Number of Plugin: 2.2.2 Device Tested On: iPhone 4 Simulator Tested On: iPhone 6s

Expected Behavior

CrossConnectivity.Current.IsRemoteReachable should work on both IPv4 and IPv6 networks.

Actual Behavior

CrossConnectivity.Current.IsRemoteReachable fails to work on IPv4 networks.

Steps to reproduce the Behavior

var reachable = await CrossConnectivity.Current.IsRemoteReachable("google.com", 80, 2000);

The above is unreachable on IPv4 networks, however it does work on IPv6 networks.

jamesmontemagno commented 8 years ago

I tested this on iPhone 6s without any issues on IPv4 and IPv6.

Simply by running my sample that I have. I setup a nat6 network and tested it on device to ping multiple addresses without any issues.

Can you provide more details and debug through the code to test it out?

I have moved the code to: http://github.com/jamesmontemagno/ConnectivityPlugin

If you debug through and find an issue please open an issue there.