From 9dafc75bb51c0f350330277a2e96b04f5a1c73b3 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Fri, 10 Jan 2020 10:35:55 +0000 Subject: Add pub library and daemon --- src/libskabus/skabus_pub_send_async.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/libskabus/skabus_pub_send_async.c (limited to 'src/libskabus/skabus_pub_send_async.c') diff --git a/src/libskabus/skabus_pub_send_async.c b/src/libskabus/skabus_pub_send_async.c new file mode 100644 index 0000000..1a2bb58 --- /dev/null +++ b/src/libskabus/skabus_pub_send_async.c @@ -0,0 +1,16 @@ +/* ISC license. */ + +#include + +#include +#include + +#include +#include "skabus-pub-internal.h" + +int skabus_pub_send_withfds_async (skabus_pub_t *a, char const *s, size_t len, int const *fds, unsigned int nfds, unsigned char const *bits, skabus_pub_send_result_t *result) +{ + struct iovec v[2] = { { .iov_base = "!", .iov_len = 1 }, { .iov_base = (char *)s, .iov_len = len } } ; + unixmessage_v_t m = { .v = v, .vlen = 2, .fds = (int *)fds, .nfds = nfds } ; + return skaclient_putmsgv_and_close(&a->connection, &m, bits, &skabus_pub_send_cb, result) ; +} -- cgit v1.3.1