GDBusConnection

Simon McVittie simon.mcvittie at collabora.co.uk
Wed May 8 05:07:11 PDT 2013


On 07/05/13 21:17, Bogdan wrote:
> In the new code I am using g_bus_get_sync for the  the
> DBUS_BUS_STARTER and DBUS_BUS_SESSION, but what shall
> I use for TCP server?
> The description of the
> g_dbus_connection_new_for_address_sync() method says:
> "This constructor can only be used to initiate
> client-side connections - use g_dbus_connection_new()
> if you need to act as the server."

"The server" here is usually the dbus-daemon, unless you're doing
peer-to-peer connections.

Ordinary D-Bus services like Avahi, NetworkManager, PolicyKit,
Telepathy, etc. are considered to be clients for the purposes of
g_dbus_connection_new_for_address_sync() - they are clients of the
dbus-daemon.

You only need to resort to g_dbus_connection_new() if you want to
listen() and accept() incoming D-Bus connections, like the dbus-daemon does.

    S


More information about the dbus mailing list