CocoaAsyncSocket via WiFi issue

24 views
Skip to first unread message

Matt Amirault

unread,
Aug 6, 2011, 5:28:15 AM8/6/11
to CocoaAsyncSocket
Hi everyone. I'm a newbie to networking, trying to add
CocoaAsyncSocket to an iPhone app.
Basically I run unmodified BonjourServer sample on an iPhone, and
BonjourClient sample on a MacBook. If I create WiFi network on my
MacBook and join this network from my iPhone, then it works, a client
(Mac) finds and connects to a server (iPhone). But if I create WiFi
network on another Mac and join this network from both iPhone and
Macbook, then client never finds a server. Is it supposed to be so? I
was under impression that while both devices are on the same network,
it should work (and normally other apps I tested are able to see each
other on this setup).

I would appreciate any help or suggestions.

Robbie Hanson

unread,
Aug 6, 2011, 3:04:15 PM8/6/11
to cocoaasy...@googlegroups.com
This is actually a bonjour issue. There may be someone here with the answer, but I would encourage you to also try the bonjour related developer mailing lists at apple.

-Robbie Hanson
Sent from my iPhone

> --
> You received this message because you are subscribed to the Google Groups "CocoaAsyncSocket" group.
> To post to this group, send email to cocoaasy...@googlegroups.com.
> To unsubscribe from this group, send email to cocoaasyncsock...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/cocoaasyncsocket?hl=en.
>

Shukuyen

unread,
Aug 7, 2011, 4:27:21 AM8/7/11
to CocoaAsyncSocket
I encountered the same issue and Robbie is right: Turn off all Bonjour
(server/browsing) activities before connecting and it should work. I
am broadcasting a notification in my app before connecting on which
the bonjour class is listening. When it receives the notification
Bonjour discovery is stopped.

Bye,
Shukuyen.

On 6 Aug., 21:04, Robbie Hanson <robbiehan...@deusty.com> wrote:
> This is actually a bonjour issue. There may be someone here with the answer, but I would encourage you to also try the bonjour related developer mailing lists at apple.
>
> -Robbie Hanson
> Sent from my iPhone
>
Reply all
Reply to author
Forward
0 new messages