diff options
Diffstat (limited to 'daemon.h')
| -rw-r--r-- | daemon.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/daemon.h b/daemon.h new file mode 100644 index 0000000..492764a --- /dev/null +++ b/daemon.h @@ -0,0 +1,23 @@ +#ifndef IPC_H +#define IPC_H + +typedef struct Timer Timer; + +int socket_create(); +void socket_set_server(int sockfd); +void socket_set_client(int sockfd); +void socket_bind_clean(int sig); + +struct Daemon { + int sockfd; + int statusfd; + Timer* timer; +}; + +typedef struct Daemon Daemon; + +void daemon_init(Daemon *d); +void *daemon_listener_loop(void *d); +void daemon_run(Daemon *d); + +#endif |
