Re: dbus Digest, Vol 159, Issue 3 - Multiple connections to dbus-daemon in single

dtdang <[email protected]>
Newsgroups gmane.comp.freedesktop.dbus
Message-ID <CAJpUOadg8PMhXRHsMrjuPEf4newvo1Ojb_sSSgm=zrj9dT1RzQ@mail.gmail.com>
Yes, I did think about using interface name but not bus name.
But I am using 'dbus_connection_read_write(conn, 0);' to listen from client
to send dbus command to bus name "conn" which I did request name for it.
The server need always be in listening status from client. I can't know
when client sending messages to process but need to use
dbus_connection_read_write routine to listen in a named bus connection.

On Thu, Oct 4, 2018 at 9:00 PM <[email protected]> wrote:

> Message: 4
> Date: Thu, 4 Oct 2018 19:56:54 +1300
> From: Lawrence D'Oliveiro <ldo-kC51rjc0cqs1dNLGKZg6taU/[email protected]>
> To: [email protected]
> Subject: Re: Re: Multiple connections to dbus-daemon in single
>         appication
> Message-ID: <20181004195654.68d4d0d1-QEjm8wl6P5m5/[email protected]>
> Content-Type: text/plain; charset=UTF-8
>
> On Thu, 4 Oct 2018 15:30:52 +0900, dtdang wrote:
>
> > Could you give me example of how to register multiple distinct name to
> > application-bus-connection when connecting to dbus-daemon ?
>
> It’s easy. You can request the registration of any number of names on a
> single bus connection
> <https://dbus.freedesktop.org/doc/api/html/group__DBusBus.html>. Then,
> when you receive a message, you call dbus_message_get_destination()
> <
> https://dbus.freedesktop.org/doc/api/html/group__DBusMessage.html#gaac65c926e6253e49aa689b4f032fad45
> >
> to determine the exact name it was addressed to.
>
> You could dispatch your method-call handling based on the bus name the
> message was addressed to, but this is probably not a good idea; better
> to key your API calls off the interface name, not the bus name.
> ************************************
>

_______________________________________________
dbus mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dbus
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.