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 09:12:51 -0700
On May 1, 2013, at 2:52 AM, Erwin Namal < email@hidden> wrote: I checked out distributed objects after posting my message, and thought I could make it work in the direction user application (proxy) → daemon (real object), I couldn't make it work in reverse. So I was left with the only possibility: polling the daemon for logs instead of waiting for them.
Once the app has opened a connection to the daemon, it can use a common design pattern like Observer to register itself for callbacks. That is, the app can call a method like -callMeBack: on a daemon-vended object, passing in its observer as a parameter, and the daemon can store that object reference and call its -somethingHappened method later.
If you're talking about the daemon initiating a connection to a client, then no, I don't think you can (or would need to) do that. In a client/server design the client connects to the server, not the other way round.
—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