• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [iPhone] networking
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [iPhone] networking


  • Subject: Re: [iPhone] networking
  • From: James Lin <email@hidden>
  • Date: Thu, 6 Aug 2009 16:27:19 +0800


My goal:
1. 1 iPhone running my app working as a server waiting for connection from another iPhone from the "internet".
2. Another iPhone running my app working as a client connects to the server iPhone and send a string "hi, I am James".
3. The server iPhone, upon receiving this string reply with user's choice of either String A or String B back to the client iPhone.
From the comment below...if an iPhone is never going to have a public IP address...
How do I make 1 iPhone connect to another?

You basically can't, and people have been trying to tell you this for some time now, most of the replies to your questions have said exactly that, you can't network through NAT, phones don't have public IP addresses, or they rarely do.



So, if I cannot make 2 iPhones talk to each other, but I have a php/ mysql server.


Can my other option be the following?

1. iPhone A post the message "Hi, I am James" to the php/mysql server and specifies the message is for iPhone B.
2. iPhone B running my app keeps querrying the php/mysql server for message left for it with a querry to php/mysql server inside a NSTimer (say querry once every 30 seconds).
3. iPhone B, upon getting a result that there is a message from iPhone B, do whatever it needs to do and post the reply back to the php/mysql server.
4. iPhone A, inside a NSTimer, querrys the php/mysql server for result of the original posting from B.


Is this my best option given what I want to accomplish?

Thanks in advance...


James _______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: [iPhone] networking
      • From: Jeremy Pereira <email@hidden>
    • Re: [iPhone] networking
      • From: Keith Duncan <email@hidden>
References: 
 >[iPhone] networking-is it crippled on the simulator? (From: James Lin <email@hidden>)
 >Re: [iPhone] networking-is it crippled on the simulator? (From: Dave Camp <email@hidden>)
 >Re: [iPhone] networking (From: James Lin <email@hidden>)
 >Re: [iPhone] networking (From: glenn andreas <email@hidden>)
 >Re: [iPhone] networking (From: James Lin <email@hidden>)
 >Re: [iPhone] networking (From: Luke the Hiesterman <email@hidden>)
 >Re: [iPhone] networking (From: James Lin <email@hidden>)
 >Re: [iPhone] networking (From: Roland King <email@hidden>)

  • Prev by Date: Re: General approach to networking/server problem?
  • Next by Date: Re: [iPhone] networking
  • Previous by thread: Re: [iPhone] networking
  • Next by thread: Re: [iPhone] networking
  • Index(es):
    • Date
    • Thread