call for advice (is dbus ok for me ?)
sfora.dim at gmail.com
Sun Sep 14 09:17:05 PDT 2008
On Sun, Sep 14, 2008 at 1:20 AM, Avery Pennarun <apenwarr at gmail.com> wrote:
> Well, in most situations you just send a message and register a
> *local* callback function in your app to be called when the reply
> message comes back. It's perfectly okay for the server to take a long
> time (minutes!) before it responds. Just don't use send_and_block(),
> use send() and register a callback.
Wow that's a great idea! thanks ! I now understand what you meant by
saying that dbus fits perfectly into the client-callback model...
really now it's easier to implement asynchronous function replies.
just one pondering: my server function takes a client callback and
still does return a synchronous return value (that for example says
whether the command is queued successfully or not). i wonder if i
should just ditch that synchronous reply and stick only with the
callback.. otherwise i will have to send two method-reply messages...
> If the server function you want to call needs to call your callback
> multiple times (for example to set up notifications or a progress
> report) you'll have to do something more complicated.
Is there a technical problem in sending a method-reply message for the
same serial number more than once or is it just ugly ?
thank you so much!!!
you REALLY helped.. and simplified my solution:)
> Have fun,
More information about the dbus