typedef struct sd_varlink {
unsigned n_ref;
- sd_varlink_server *server;
-
VarlinkState state;
+ sd_varlink_server *server;
/* Transport layer: input/output buffers, fd passing, output queue, read/write/parse
* step functions, sd-event integration (input/output/time event sources, idle
unsigned n_pending;
+ /* Per-call protocol-upgrade marker: set when the *current* method call carries the
+ * SD_VARLINK_METHOD_UPGRADE flag. Validated by sd_varlink_reply_and_upgrade() to
+ * ensure the caller's contract is honored. The transport-layer "stop reading at the
+ * next message boundary" behavior is governed independently by the JsonStream's
+ * bounded_reads flag. */
+ bool protocol_upgrade;
+
sd_varlink_reply_t reply_callback;
sd_json_variant *current;
size_t n_previous_fds;
char *sentinel;
- /* Per-call protocol-upgrade marker: set when the *current* method call carries the
- * SD_VARLINK_METHOD_UPGRADE flag. Validated by sd_varlink_reply_and_upgrade() to
- * ensure the caller's contract is honored. The transport-layer "stop reading at the
- * next message boundary" behavior is governed independently by the JsonStream's
- * bounded_reads flag. */
- bool protocol_upgrade;
-
void *userdata;
sd_event_source *quit_event_source;
sd_event *event;
int64_t event_priority;
- unsigned n_connections;
Hashmap *by_uid; /* UID_TO_PTR(uid) → UINT_TO_PTR(n_connections) */
+ unsigned n_connections;
+ unsigned connections_max;
+ unsigned connections_per_uid_max;
+
+ bool exit_on_idle;
void *userdata;
char *product;
char *version;
char *url;
-
- unsigned connections_max;
- unsigned connections_per_uid_max;
-
- bool exit_on_idle;
} sd_varlink_server;
#define varlink_log_errno(v, error, fmt, ...) \