Re: Distributed Objects or NSFileHandle?
Re: Distributed Objects or NSFileHandle?
- Subject: Re: Distributed Objects or NSFileHandle?
- From: "Adam R. Maxwell" <email@hidden>
- Date: Fri, 22 Jun 2007 12:53:30 -0700
On Friday, June 22, 2007, at 12:22PM, "Kam Dahlin" <email@hidden> wrote:
>Hi Adam,
>
>Thanks!
>
>I haven't been able to find any Bonjour/Distributed Objects examples
>out there to work from so I would love to check out your code.
>I don't think I am looking for interoperability and I want to take
>advantage of the DO system so I am pretty set on trying to make it work.
Looks like I posted the links here about a year ago, when a similar question came up:
http://lists.apple.com/archives/cocoa-dev/2006/Jun/msg01586.html
The code could be simplified significantly if you avoid using threads and authentication (and probably simplified further if you have a clue about DO). BDSKSharedGroupServer is the network client object (called server because of its parent class and our DO architecture). Our design creates a network client & thread for each remote machine it finds via Bonjour (BDSKSharingBrowser singleton), although it doesn't attempt to establish a DO connection unless the user clicks on the remote host in the source list. The BDSKSharingServer is a singleton that advertises over Bonjour and vends objects in another thread. It also listens for network transitions, hostname changes, password requests, and lots of other fun things.
I'd be happy to answer further questions off-list to avoid boring people here. I'd actually recommend pulling the source and building it; the program has a hidden pref so you can browse and connect to your local machine, which is handy for debugging.
regards,
Adam
_______________________________________________
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