October 22nd, 2012, 04:30 AM
Client server question
I would like to create a chat program that connects phone to phone directly, each phone being both a client and a server.
How do I make a direct connection to a phone??
Find out the IP?
But don't the IPs change over time?
If so, how do I compensate for the changing of phones IP address?
October 22nd, 2012, 07:00 PM
At least one client needs to know the IP of the other one. Yes, most IPs do change over time.
Normally you would compensate for this by having a centralized server with a static IP that clients communicate with to form some mapping between a static identifier (like a username) and their corresponding dynamic IP address.