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       emission 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
46   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       These APIs are implemented as a shared library, which can be compiled
54       and linked to with the libsystemd pkg-config(1) file.
55

SEE ALSO

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