Re: how to archive NSNetService?
Re: how to archive NSNetService?
- Subject: Re: how to archive NSNetService?
- From: "A.M." <email@hidden>
- Date: Fri, 16 Jan 2009 18:44:54 -0500
On Jan 16, 2009, at 5:00 PM, Allyn Bauer wrote:
Hello all,
I'm writing a fairly simple server <-> client app. The server
publishes a network name using Bonjour and clients get a list of
names. They choose one (for now). After this choice, I would like the
selection to somehow be saved using NSUserDefaults. I'm assuming the
easiest way to do this is to get the name of the saved network and
save that string. Is this assumption correct? If not, how would you
suggest I accomplish this? Is there anyway to save the enough network
information to reconnect to the same server even if the network name
has been changed?
The goal is to be able to automatically reconnect to an already chosen
network -- if there's one saved -- when the app loads.
I'm still learning this stuff, but it's becoming slightly easier.
Thanks for the help.
There isn't anything reliable that you can save to be certain that you
will be connecting to the same service. Network conditions change. I
would suggest adding a UUID to the TXT record of the server's
NSNetService to uniquely identify that instance of the server.
Cheers,
M
_______________________________________________
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