In some cases, clients may need a way to ensure that all queued
messages have been flushed and are sent to the daemon
(before, for instance, exiting).
This commit adds an API to block until the outgoing request queue is
empty.
LT_INIT
## increment if the interface has additions, changes, removals.
-LT_CURRENT=2
+LT_CURRENT=3
## increment any time the source changes; set to
## 0 if you increment CURRENT
## increment if any interfaces have been added; set to 0
## if any interfaces have been changed or removed. removal has
## precedence over adding, so set to 0 if both happened.
-LT_AGE=0
+LT_AGE=1
AC_SUBST(LT_CURRENT)
AC_SUBST(LT_REVISION)
NULL, handler, failed_handler, user_data);
}
+void
+ply_boot_client_flush (ply_boot_client_t *client)
+{
+ assert (client != NULL);
+
+ while (ply_list_get_length (client->requests_to_send) > 0)
+ {
+ ply_event_loop_process_pending_events (client->loop);
+ }
+}
+
void
ply_boot_client_disconnect (ply_boot_client_t *client)
{
ply_boot_client_response_handler_t handler,
ply_boot_client_response_handler_t failed_handler,
void *user_data);
+void ply_boot_client_flush (ply_boot_client_t *client);
void ply_boot_client_disconnect (ply_boot_client_t *client);
void ply_boot_client_attach_to_event_loop (ply_boot_client_t *client,
ply_event_loop_t *loop);