diff options
Diffstat (limited to 'src/libunixonacid/textclient_server_init.c')
-rw-r--r-- | src/libunixonacid/textclient_server_init.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libunixonacid/textclient_server_init.c b/src/libunixonacid/textclient_server_init.c new file mode 100644 index 0000000..27d3a20 --- /dev/null +++ b/src/libunixonacid/textclient_server_init.c @@ -0,0 +1,12 @@ +/* ISC license. */ + +#include <stdlib.h> +#include <skalibs/djbunix.h> +#include <skalibs/textclient.h> + +int textclient_server_init (textmessage_receiver_t *in, textmessage_sender_t *syncout, textmessage_sender_t *asyncout, char const *before, size_t beforelen, char const *after, size_t afterlen, tain_t const *deadline, tain_t *stamp) +{ + return getenv(SKALIBS_CHILD_SPAWN_FDS_ENVVAR) ? + textclient_server_init_frompipe(in, syncout, asyncout, before, beforelen, after, afterlen, deadline, stamp) : + textclient_server_init_fromsocket(in, syncout, asyncout, before, beforelen, after, afterlen, deadline, stamp) ; +} |