nds2-client - Developer 0.16.7
Loading...
Searching...
No Matches
daqc_listener.h
Go to the documentation of this file.
1/* -*- tab-width:8 c-basic-offset:4 indent-tabs-mode:nil -*- */
2/* set vi: ts=8:softtabstop=4,shiftwidth=4,expandtab */
3
4#ifndef DAQ_LISTENER_H
5#define DAQ_LISTENER_H
6
7#include "daqc.h"
8
9struct sockaddr_in;
10
11#if HAVE_PTHREAD_H
12typedef pthread_t thread_t;
13typedef pthread_mutex_t mutex_t;
14#elif _WIN32
15typedef HANDLE thread_t;
16typedef HANDLE mutex_t;
17#else /* HAVE_PTHREAD_H */
18#endif /* HAVE_PTHREAD_H */
19
20#ifndef VXWORKS
21
63typedef struct
64{
65
68
70 struct sockaddr_in* listener_addr;
71
73 void* ( *interpreter )( void* );
74
78
80 thread_t listener_tid;
81
84
87 mutex_t lock;
88
90
107 daq_t* daq,
108 int* tcp_port,
109 void* ( *start_func )(void*));
110
122int daq_shutdown( daq_listen_t* lstn );
123
127#endif /* defined(VXWORKS) */
128#endif /* defined(DAQ_LISTENER_H) */
int daq_shutdown(daq_listen_t *lstn)
Kill the listener thread.
Definition daqc_listener.c:490
daq_listen_t * daq_initialize(daq_listen_t *lstn, daq_t *daq, int *tcp_port, void *(*start_func)(void *))
Create a network listener thread.
Definition daqc_listener.c:395
NDS1/2 client status structure.
Definition daqc.h:233
Definition daqc_listener.h:64
thread_t interpreter_tid
Definition daqc_listener.h:83
mutex_t lock
Definition daqc_listener.h:87
int shutting_down
Definition daqc_listener.h:77
struct sockaddr_in * listener_addr
Definition daqc_listener.h:70
daq_t * daq
Definition daqc_listener.h:67
thread_t listener_tid
Definition daqc_listener.h:80