summaryrefslogtreecommitdiff
path: root/src/libskabus/skabus_pub_sendv.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2020-01-10 10:35:55 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2020-01-10 10:35:55 +0000
commit9dafc75bb51c0f350330277a2e96b04f5a1c73b3 (patch)
treed00d225400b981648d362e4c3bb56b46c0608b7c /src/libskabus/skabus_pub_sendv.c
parent4a14a6b86a4a3c5ab8bc36e4c417a6783dfab463 (diff)
downloadskabus-9dafc75bb51c0f350330277a2e96b04f5a1c73b3.tar.xz
Add pub library and daemon
Diffstat (limited to 'src/libskabus/skabus_pub_sendv.c')
-rw-r--r--src/libskabus/skabus_pub_sendv.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/libskabus/skabus_pub_sendv.c b/src/libskabus/skabus_pub_sendv.c
new file mode 100644
index 0000000..ff1c743
--- /dev/null
+++ b/src/libskabus/skabus_pub_sendv.c
@@ -0,0 +1,16 @@
+/* ISC license. */
+
+#include <errno.h>
+
+#include <skalibs/uint64.h>
+#include <skalibs/skaclient.h>
+
+#include <skabus/pub.h>
+
+uint64_t skabus_pub_sendv_withfds (skabus_pub_t *a, struct iovec const *v, unsigned int vlen, int const *fds, unsigned int nfds, unsigned char const *bits, tain_t const *deadline, tain_t *stamp)
+{
+ skabus_pub_send_result_t r ;
+ if (!skabus_pub_sendv_withfds_async(a, v, vlen, fds, nfds, bits, &r)) return 0 ;
+ if (!skaclient_syncify(&a->connection, deadline, stamp)) return 0 ;
+ return r.err ? (errno = r.err, 0) : r.u ;
+}