Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

Connecting to a server from outside/inside a local network

$
0
0

Hello, again:

I have an app that should connect to a server. That's fine. The problem is that the server has a different IP if I connect from within it's local network or outside (a 192.168.x.x on local, and the ISP defined IP from outside).
I would like the app can connect to it automatically, but I can't figure it out how. My first though was to check if I was connected via device WiFi or using the phone network, but then it will have problems if I'm connected via WiFi to another local network, like home's.
I was thinking to check the SSID name of the connected network (if I can figure it out how to do it), but I came to the problem of what if I find another network with the same name. Then I though about MAC address, but the local network can have more than one router/splitter/repeater to connect, and can be problematic to maintain.

Is there a way I didn't though, outside to send an http HEAD message and wait for an OK response?


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>