#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2010
    Posts
    1
    Rep Power
    0

    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?
  2. #2
  3. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,301
    Rep Power
    7170
    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.
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around

IMN logo majestic logo threadwatch logo seochat tools logo