Top | ![]() |
![]() |
![]() |
![]() |
DeeServer * | dee_server_new () |
DeeServer * | dee_server_new_for_address () |
const gchar * | dee_server_get_client_address () |
gchar * | dee_server_bus_address_for_name () |
gchar * | bus-address | Read / Write / Construct Only |
gboolean | same-user-only | Read / Write / Construct Only |
DeeServer allows you to create private connections (connections which are not routed via dbus-daemon). Note that, unlike DeePeer, DeeServer will always be swarm leader, and clients connected to it cannot overtake swarm leadership once the server connection is closed.
DeeServer *
dee_server_new (const gchar *swarm_name
);
Creates a new instance of DeeServer and tries to bind to “bus-address”. The “swarm-leader” property will be set when the binding succeeds.
Note that this function will automatically determine the value
of “bus-address” property and will generally cause your
application to use new socket for every DeeServer with different swarm
name. See dee_server_new_for_address()
if you'd like to share one
connection between multiple DeeServer instances.
DeeServer * dee_server_new_for_address (const gchar *swarm_name
,const gchar *bus_address
);
Creates a new instance of DeeServer and tries to bind to bus_address
.
The “swarm-leader” property will be set when the binding succeeds.
If there is already a DeeServer instance bound to bus_address
,
the connection will be shared with the newly constructed instance.
This function is primarily meant for sharing of one connection (socket) between multiple DeeServers, so that you can create DeeServer instances with varying swarm names, but the same bus address, which will cause them to share the connection (the sharing is possible only within the same process though).
const gchar *
dee_server_get_client_address (DeeServer *server
);
Gets a D-Bus address string that can be used by clients to connect to server.
gchar * dee_server_bus_address_for_name (const gchar *name
,gboolean include_username
);
Helper method which creates bus address string for the given name, which should have the same format as a DBus unique name.
“bus-address”
property“bus-address” gchar *
Bus address to use for the connection.
Flags: Read / Write / Construct Only
Default value: NULL
“same-user-only”
property“same-user-only” gboolean
Accept connections from current user only.
Flags: Read / Write / Construct Only
Default value: TRUE