about summary refs log tree commit diff
path: root/src/libunixonacid/textclient_server_init.c
blob: d2d886bf9999517b52a3bd8cd65a07ef6f12072f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* ISC license. */

#include <stdlib.h>

#include <skalibs/cspawn.h>
#include <skalibs/textclient.h>

int textclient_server_init (textmessage_receiver *in, textmessage_sender *syncout, textmessage_sender *asyncout, char const *before, size_t beforelen, char const *after, size_t afterlen, tain const *deadline, tain *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) ;
}