BonjourService Info

3 views
Skip to first unread message

Stoph

unread,
Mar 31, 2010, 10:50:08 AM3/31/10
to BLIP Protocol
I'm experimenting with the BonjourBrowser and I have a user interface
question. My app currently starts a bonjour browser and a
BLIPListener at the same time, with a UITableView displaying any
bonjour services that have been found. The problem is that the
browser finds itself. Is there a way to differentiate between the
local service and services that have originated from other devices?

Thanks,
Chris

Jens Alfke

unread,
Mar 31, 2010, 11:24:36 AM3/31/10
to Stoph, BLIP Protocol

On Mar 31, 2010, at 7:50 AM, Stoph wrote:

> Is there a way to differentiate between the
> local service and services that have originated from other devices?

Compare the service name to the one you’ve published. (You have to compare to your actual service name, not the name you asked for, because it might have been disambiguated by appending a digit to it.)

—Jens

Stoph

unread,
Apr 1, 2010, 4:11:27 PM4/1/10
to BLIP Protocol
Just as a note to anyone who might read this, you have to access the
actual name through the BonjourService object associated with your
listener, not just through the bonjourServiceName property. For
example:

This will give you the updated name:
[[MyBlipListener bonjourService] name];

This will give you the name you asked for:
[MyBlipListener bonjourServiceName];

At least this seems to be the case for me.

-Chris

Reply all
Reply to author
Forward
0 new messages