Question

I have a running server on my LAN and an android app that needs to socket connect to that server. My problem right now is that the server's ip is changing (for some good reasons, I can't make it static).

Is there any way to "auto discover" the server without using ddns? this system works only in LAN and both parties (windows server and android client) are in the same subnet.

Thanks

Was it helpful?

Solution

Now knowing that:

  • Both parties do not have internet
  • DDns is not an option
  • Broadcasting not allowed

The only option left is, when the android fails to connect to the server, try talking with every found ip on LAN one-by-one until someone respond.

This should of course be done in a fashion so that only your server would respond correctly.

As you are on a LAN this loss in connection should happen very rarely, if ever, unless server is restartet. Though, that depends on the LAN setup.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top