• 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: Kaelten <email@hidden>
  • Date: Tue, 4 Aug 2009 13:15:45 -0500

Just brainstorming theory here, but it might be made much easier if
you had a server act as an intermediary, even if all that server does
is 'introduce' the two iphones to each other.

Bryan McLemore
Kaelten



On Tue, Aug 4, 2009 at 1:10 PM, James Lin<email@hidden> wrote:
> Correct me if I am wrong...but from what i have read so far...
>
> Bonjour is for local area network, right?
>
> What I am trying to do is to get 2 iPhones located in 2 different part of
> the world to connect to each other on the internet.
> Can Bonjour work?
>
> Thanx in advance...
>
> James
> On 2009/8/5, at 上午 2:02, glenn andreas wrote:
>
>>
>> On Aug 4, 2009, at 12:49 PM, James Lin wrote:
>>
>>> I am trying to make the iPhone a server and a client at the same time...
>>>
>>> What I am trying to accomplish...
>>>
>>> 1. iPhone running my application opens a "server" socket and listens for
>>> incoming network connection from another iPhone running the same
>>> application.
>>> 2. The server socket has an "ip address" that i can register with my
>>> php/mysql server.
>>> 3. Another iPhone running my same app acts as the client gets the iPhone
>>> server's ip address from the server and make connection to the server
>>> iPhone.
>>> 4. The client iPhone sends a string "hello, I am James" to the server
>>> iPhone and the server iPhone reply with the user's choice of either "Hi,
>>> Nice to meet you" or "Get lost!" strings.
>>
>>
>> Unless the two phones are on the same local WiFi network, due to the way
>> that various NATs (especially with cell phone networking), a client will
>> almost certainly not be able  to connect to a server running on the phone.
>>  Basically, the phone see only a local (private) network, and will have an
>> address such as 10.3.5.12.  Unfortunately, that IP address is meaningless
>> outside of local network (there is no way for a  remote phone, which may
>> have the exact same address, to find 10.3.5.12 as being your local phone).
>>
>> Given that trying to support phone based servers isn't going to work
>> except for within the same WiFi network, you might as well instead use
>> Bonjour for one  phone to discover the other phone (which will automatically
>> handle finding/resolving/advertising ip address/ports).
>>
>>
>> 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
>
_______________________________________________

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

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>)

  • Prev by Date: Using NSTimer and CGEventPost causes problems
  • Next by Date: Design Question
  • Previous by thread: Re: Bonjour over WAN
  • Next by thread: How refresh window title
  • Index(es):
    • Date
    • Thread