ServerSocket Not Returning Correct IP

margret

Well-Known Member
Licensed User
Longtime User
I am having an issue where the first time I run the code below, it returns the IP I have set. If I then go back and change the IP and run this code again. It shows the IP that I used the first time and not the current one. Do you see what I am doing wrong? The device is a tablet and has only one WiFi connection.

B4X:
Dim MyLan As ServerSocket
MyLan.Initialize(0, "")
MyLan.Listen
Msgbox(MyLan.GetMyIP, "")
 
Top