summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2015-01-04 19:00:46 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2015-01-04 19:00:46 +0000
commit5b4cf1798bfaf7be1dfaea36614757db80cae23d (patch)
tree3ab634ccb9bfe4de6c50be8c0f1cef48d2d53914 /src/include
parentd76cbe1a8d6ae1e839bd7613f3291da2c9b042d0 (diff)
downloadskalibs-5b4cf1798bfaf7be1dfaea36614757db80cae23d.tar.xz
Add unixmessage_drop and some stuff in skaclient
Diffstat (limited to 'src/include')
-rw-r--r--src/include/skalibs/skaclient.h2
-rw-r--r--src/include/skalibs/unixmessage.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/include/skalibs/skaclient.h b/src/include/skalibs/skaclient.h
index 4705df1..2875304 100644
--- a/src/include/skalibs/skaclient.h
+++ b/src/include/skalibs/skaclient.h
@@ -99,6 +99,7 @@ extern int skaclient_sendv (skaclient_t *, siovec_t const *, unsigned int, unixm
#define skaclient_sendv_g(a, v, vlen, cb, result, deadline) skaclient_sendv(a, v, vlen, cb, result, (deadline), &STAMP)
#define skaclient_sfd(a) unixmessage_receiver_fd(&(a)->syncin)
+#define skaclient_siswritable(a) (!unixmessage_sender_isempty(&(a)->syncout))
#define skaclient_flush(a) unixmessage_sender_flush(&(a)->syncout)
#define skaclient_timed_flush(a, deadline, stamp) unixmessage_sender_timed_flush(&(a)->syncout, deadline, stamp)
#define skaclient_timed_flush_g(a, deadline) skaclient_timed_flush(a, (deadline), &STAMP)
@@ -116,6 +117,7 @@ extern int skaclient_syncify (skaclient_t *, tain_t const *, tain_t *) ;
extern unixmessage_handler_func_t skaclient_default_cb ;
+#define skaclient_aiswritable(a) (!unixmessage_sender_isempty(&(a)->asyncout))
#define skaclient_aput_and_close(a, m, bits) unixmessage_put_and_close(&(a)->asyncout, m, bits)
#define skaclient_aputv_and_close(a, m, bits) unixmessage_putv_and_close(&(a)->asyncout, m, bits)
#define skaclient_aput(a, m) unixmessage_put(&(a)->asyncout, m)
diff --git a/src/include/skalibs/unixmessage.h b/src/include/skalibs/unixmessage.h
index e45dc09..eaf66c5 100644
--- a/src/include/skalibs/unixmessage.h
+++ b/src/include/skalibs/unixmessage.h
@@ -26,6 +26,8 @@ struct unixmessage_s
#define UNIXMESSAGE_ZERO { .s = 0, .len = 0, .fds = 0, .nfds = 0 }
extern unixmessage_t const unixmessage_zero ;
+extern void unixmessage_drop (unixmessage_t const *) ;
+
typedef struct unixmessage_v_s unixmessage_v_t, *unixmessage_v_t_ref ;
struct unixmessage_v_s
{