1 /* ISC license. */
2
3 #include <skalibs/allreadwrite.h>
4 #include <skalibs/skaclient.h>
5 #include <skalibs/unixmessage.h>
6
skaclient_server_init(unixmessage_receiver_t * in,unixmessage_sender_t * out,unixmessage_sender_t * asyncout,char const * before,size_t beforelen,char const * after,size_t afterlen,tain_t const * deadline,tain_t * stamp)7 int skaclient_server_init (unixmessage_receiver_t *in, unixmessage_sender_t *out, unixmessage_sender_t *asyncout, char const *before, size_t beforelen, char const *after, size_t afterlen, tain_t const *deadline, tain_t *stamp)
8 {
9 unixmessage_t m ;
10 return (sanitize_read(unixmessage_timed_receive(in, &m, deadline, stamp)) >= 0)
11 && skaclient_server_ack(&m, out, asyncout, before, beforelen, after, afterlen)
12 && unixmessage_sender_timed_flush(out, deadline, stamp) ;
13 }
14