• 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 15:51:53 +0800

How does Bonjour handle the task of introducing 2 iPhones (located in 2 parts of the world) to each other?

The documentations i've found so far all point to Bonjour working on local network only, (even on Apple's website).
Can you please point me to the documentation where it explains how Bonjour works over the "internet"?


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?



Sorry for the repeating question...I am just getting more and more confused instead so far...


Thank you in advance...

James

On 2009/8/5, at 上午 2:13, Luke the Hiesterman wrote:


On Aug 4, 2009, at 11:10 AM, James Lin wrote:

Bonjour is for local area network, right?

No, Bonjour is applicable to any networking, local or wide area. Here's some sample code.


http://developer.apple.com/iphone/library/samplecode/BonjourWeb/index.html

Luke


On 2009/8/6, at 上午 7:58, glenn andreas wrote:


On Aug 4, 2009, at 4:42 PM, Shawn Erickson wrote:

On Tue, Aug 4, 2009 at 11:13 AM, Luke the Hiesterman<email@hidden > wrote:

On Aug 4, 2009, at 11:10 AM, James Lin wrote:

Bonjour is for local area network, right?

No, Bonjour is applicable to any networking, local or wide area. Here's some
sample code.


http://developer.apple.com/iphone/library/samplecode/BonjourWeb/index.html

Well ad-hoc discovery only works on the local sub-net or across bridged sub-nets. To do service discovery across sub-nets would require a known DNS server publishing the existence of services and how to contact them via public IP addresses.


Of course, in the context of the original question (re: iPhone networking), the iPhone is almost never going to have a public IP address (being hidden behind WiFi or cell phone NATs).


Glenn Andreas email@hidden <http://www.gandreas.com/> wicked fun! Mad, Bad, and Dangerous to Know
_______________________________________________

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: Roland King <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>)

  • Prev by Date: resolving addresses for the system framework
  • Next by Date: Re: [iPhone] networking
  • Previous by thread: Re: Garbage Collection, Core Foundation, and toll-free bridging
  • Next by thread: Re: [iPhone] networking
  • Index(es):
    • Date
    • Thread