40 if ( procfunct == NULL ) {
41 error (
"procfunct == NULL" );
47 if ( procfunct ( arg, sockcmd_p ) )
48 switch ( sockcmd_p->
cmd_id ) {
61 threaddata_p->
arg = proc_p;
64 threaddata_p->
flags = flags;
70 const char *
const socket_path,
73 const char *
const action,
77 if ( procfunct == NULL ) {
83 memset ( proc_p, 0,
sizeof ( *proc_p ) );
84 proc_p->
sock_p = socket_x_unix ( socket_path );
86 if ( proc_p->
sock_p == NULL ) {
89 if ( errno == EUSERS ) {
90 error (
"clsync_%s_unix(): Too many connections.", action );
94 error (
"clsync_%s_unix(): Cannot socket_%s_unix()",
101 if ( threaddata_p == NULL ) {
clsyncproc_t * clsync_listen_unix(const char *const socket_path, clsyncsock_procfunct_t procfunct, sockprocflags_t flags)
int libproc_procclsyncsock(socket_sockthreaddata_t *arg, sockcmd_t *sockcmd_p)
clsyncproc_t * clsync_connect_unix(const char *const socket_path, clsyncsock_procfunct_t procfunct, sockprocflags_t flags)
static clsyncproc_t * _clsync_x_unix(const char *const socket_path, clsyncsock_procfunct_t procfunct, sockprocflags_t flags, const char *const action, clsyncsock_t *(*socket_x_unix)(const char *const))
static int _clsync_connect_setthreaddata(socket_sockthreaddata_t *threaddata_p, clsyncproc_t *proc_p, sockprocflags_t flags)
clsyncsock_t * socket_listen_unix(const char *const socket_path)
int socket_sendinvalid(clsyncsock_t *clsyncsock_p, sockcmd_t *sockcmd_p)
socket_sockthreaddata_t * socket_thread_attach(clsyncsock_t *clsyncsock_p)
int socket_close(clsyncsock_t *clsyncsock_p)
int socket_thread_start(socket_sockthreaddata_t *threaddata_p)
enum sockprocflags sockprocflags_t
clsyncsock_t * socket_connect_unix(const char *const socket_path)
int(* clsyncsock_procfunct_t)(struct socket_sockthreaddata *, sockcmd_t *)
clsyncsock_procfunct_t procfunct
clsyncsock_t * clsyncsock_p
clsyncsock_procfunct_t procfunct
freefunct_t freefunct_arg