[prev in list] [next in list] [prev in thread] [next in thread]
List: freedesktop-dbus
Subject: Re: Targetted signals
From: "Daniel P. Berrange" <dan () berrange ! com>
Date: 2006-06-07 15:18:31
Message-ID: 20060607151831.GA19005 () berrange ! com
[Download RAW message or body]
On Wed, Jun 07, 2006 at 03:37:47PM +0100, Ross Burton wrote:
> Hi,
>
> This has come up before but I don't think there was a good resolution to
> it, and now that DBus 1.0 is drawing closer I think it needs a good
> answer. Can signals be send to a specific address, or are they always
> broadcast to all interested parties?
>
> For example, if :1.2 and :1.3 both have relevant matchers to receive
> this signal:
>
> message = dbus_message_new_signal ("/foo", "FooInterface", "Bar");
>
> Will doing this:
>
> dbus_message_set_destination (message, ":1.2");
>
> Cause the signal to be sent to both :1.2 and :1.3 (destination is
> ignored, signals are sent to all interested clients), or just :1.2?
> (destination if set is respected)?
Actually I think if you set an explicit destination on the signal it will
do the right thing - ie unicast to that recipient only.
The only problems I remember having with setting an explicit destinations
are:
* In the context of method calls - you can set a destination to be a
well known bus name (org.example.blah), but it wouldn't let me set a
destination based on unique name (:1.2).
* Signal match rules - you can register a match rule based on a unique
bus name (:1.2), but not one based ona well known bus name
(org.example.blah).
So if the owner of a well known name gets replaced, your method calls
will suddenly go to the new destination, but your signals will be refering
to the old destination....
Regards,
Dan.
--
|=- GPG key: http://www.berrange.com/~dan/gpgkey.txt -=|
|=- Perl modules: http://search.cpan.org/~danberr/ -=|
|=- Projects: http://freshmeat.net/~danielpb/ -=|
|=- berrange@redhat.com - Daniel Berrange - dan@berrange.com -=|
["signature.asc" (application/pgp-signature)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic