1SD_BUS_SET_CONNECTED_SIGNALs(d3_)bus_set_connected_siSgDn_aBlUS_SET_CONNECTED_SIGNAL(3)
2
3
4

NAME

6       sd_bus_set_connected_signal, sd_bus_get_connected_signal - Control
7       emmission of local connection establishment signal on bus connections
8

SYNOPSIS

10       #include <systemd/sd-bus.h>
11
12       int sd_bus_set_connected_signal(sd_bus *bus, int b);
13
14       int sd_bus_get_connected_signal(sd_bus *bus);
15

DESCRIPTION

17       sd_bus_set_connected_signal() may be used to control whether a local,
18       synthetic Connected() signal message shall be generated and enqueued
19       for dispatching when the connection is fully established. If the b
20       parameter is zero the message is not generated (the default), otherwise
21       it is generated.
22
23       sd_bus_get_connected_signal() may be used to query whether this feature
24       is enabled. It returns zero if not, positive otherwise.
25
26       The Connected() signal message is generated from the
27       "org.freedesktop.DBus.Local" service and interface, and
28       "/org/freedesktop/DBus/Local" object path. Use
29       sd_bus_match_signal_async(3) to match on this signal.
30
31       This message is particularly useful on slow transports where
32       connections take a long time to be established. This is especially the
33       case when sd_bus_set_watch_bind(3) is used. The signal is generated
34       when the sd_bus_is_ready(3) returns positive for the first time.
35
36       The Connected() signal corresponds with the Disconnected() signal that
37       is synthesized locally when the connection is terminated. The latter is
38       generated unconditionally however, unlike the former which needs to be
39       enabled explicitly before it is generated, with
40       sd_bus_set_connected_signal().
41

RETURN VALUE

43       On success, these functions return 0 or a positive integer. On failure,
44       they return a negative errno-style error code.
45

ERRORS

47       Returned errors may indicate the following problems:
48
49       -ECHILD
50           The bus connection has been created in a different process.
51

NOTES

53       sd_bus_set_connected_signal() and sd_bus_get_connected_signal() are
54       available as a shared library, which can be compiled and linked to with
55       the libsystemd pkg-config(1) file.
56

SEE ALSO

58       systemd(1), sd-bus(3), sd_bus_match_signal_async(3),
59       sd_bus_set_watch_bind(3), sd_bus_is_ready(3)
60
61
62
63systemd 239                                     SD_BUS_SET_CONNECTED_SIGNAL(3)
Impressum