-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathyaul.h
54 lines (46 loc) · 1.11 KB
/
yaul.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*
* Header definitions of main file
*
* File: yaul.h
* Author: Andreas Behringer
*
* (c)2012 Andreas Behringer
* Copyright: GPL see included LICENSE file
*
* Created on January 9, 2013, 1:28 PM
*/
#ifndef YAUL_H
#define YAUL_H
#ifdef __cplusplus
extern "C" {
#endif
// Struct for buffering opened filehandles
typedef struct handlebuffer {
char name[NAMELENGTH];
FILE * filehandle;
} handlebuffer;
/* Function Prototypes */
static int cmpKeys(void *a, void *b);
void closeRandomFile(void);
void closeAllFiles(void);
void shutdownServer(void);
static void sig_hup(int signo);
static void sig_int(int signo);
static void sig_term(int signo);
void print_version(void);
void print_usage(void);
void daemonize_server(void);
void openRedis(void);
void initServer(void);
FILE * openLogfile(char *name);
void logMessageFile(char *name, char *message);
void logMessageRedis(char *name, char *message);
void logMessage(char *buffer, char *address, unsigned int port);
void statistics(void);
void serverLoop(void);
/* Debug helpers */
void hashtableDump(struct hashtable *h);
#ifdef __cplusplus
}
#endif
#endif /* YAUL_H */