Ad

Exchange Internal Ip Blindly Using Python

- 1 answer

I would like to share my internal IP between two devices on a network (using python 3).

Let's say I have my phone, and my computer. Both connected to the same network. I need to run a client and server script to connect the two but in order to do that, my phone (client) needs the ip of the computer (server). The IP of the computer changes all the time (school wifi, nothing I can do about it) and even so I would like this to work instantly when connected to a new router without having to manually enter the IP.

One more thing, due to the huge amounts of devices on the network, mapping every device and finding the computer name to get the IP will take too long for its purpose.

Ad

Answer

In case anyone was wondering. I take this question as unsolvable, but, in order to solve my issue, I have set my computer to upload its internal IP to a server each time it connects to a new network. My phone then reads the server.

Ad
source: stackoverflow.com
Ad