summaryrefslogtreecommitdiff
path: root/src/libunixonacid/unixconnection_init_withclosecb.c
blob: fedc176de90fe0614fc7626614d06a2fcf14c46b (plain)
1
2
3
4
5
6
7
8
9
10
 /* ISC license. */

#include <skalibs/unixmessage.h>
#include <skalibs/unixconnection.h>

void unixconnection_init_withclosecb (unixconnection *io, int fdin, int fdout, unixmessage_sender_closecb_func_ref f, void *p)
{
  unixmessage_receiver_init(&io->in, fdin, io->mainbuf, UNIXMESSAGE_BUFSIZE, io->auxbuf, UNIXMESSAGE_AUXBUFSIZE) ;
  unixmessage_sender_init_withclosecb(&io->out, fdout, f, p) ;
}