Re: Launchd daemon / user app communication
Re: Launchd daemon / user app communication
- Subject: Re: Launchd daemon / user app communication
- From: Jens Alfke <email@hidden>
- Date: Wed, 01 May 2013 10:14:45 -0700
On May 1, 2013, at 9:52 AM, Erwin Namal < email@hidden> wrote: I see. How then would the -callMeBack: method be implemented? Something like: - (void)logToTarget:(byref id)aTarget; and the server would call [target logThis: …]?
Something like that. Read up on the Observer Design Pattern[1] if you want inspiration. I also can't recommend the classic "Design Patterns" book (Gamma et al) too highly for any programmer.
In Obj-C you would have the daemon's DO API define a protocol for the client's observer object to implement, declaring a message that the daemon will send the observer. It's a lot like the way you implement a class that supports a delegate.
—Jens
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden