Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 38 lines (26 sloc) 0.442 kb
a42f287 @nicolasff Name change.
authored
1 #ifndef SERVER_H
2 #define SERVER_H
282d900 @nicolasff Removed global variables.
authored
3
4 #include <event.h>
5b7aa50 @nicolasff Partial rewrite, adding WebSockets, threads, pool.
authored
5 #include <hiredis/async.h>
9f92ecf @nicolasff Use a spinlock on the log writer.
authored
6 #include <pthread.h>
282d900 @nicolasff Removed global variables.
authored
7
5b7aa50 @nicolasff Partial rewrite, adding WebSockets, threads, pool.
authored
8 struct worker;
9 struct conf;
282d900 @nicolasff Removed global variables.
authored
10
5b7aa50 @nicolasff Partial rewrite, adding WebSockets, threads, pool.
authored
11 struct server {
0dde1f5 @nicolasff Start changing HTTP parser.
authored
12
13 int fd;
14 struct event ev;
5b7aa50 @nicolasff Partial rewrite, adding WebSockets, threads, pool.
authored
15 struct event_base *base;
282d900 @nicolasff Removed global variables.
authored
16
5b7aa50 @nicolasff Partial rewrite, adding WebSockets, threads, pool.
authored
17 struct conf *cfg;
a8bccb4 @nicolasff Refactoring
authored
18
5b7aa50 @nicolasff Partial rewrite, adding WebSockets, threads, pool.
authored
19 /* worker threads */
20 struct worker **w;
21 int next_worker;
9f92ecf @nicolasff Use a spinlock on the log writer.
authored
22
23 /* log lock */
0e061f6 @nicolasff Fixed log buf, removed spin lock.
authored
24 struct {
25 pid_t self;
26 int fd;
27 } log;
5b7aa50 @nicolasff Partial rewrite, adding WebSockets, threads, pool.
authored
28 };
9378544 @nicolasff Fix subscribe leak.
authored
29
a8bccb4 @nicolasff Refactoring
authored
30 struct server *
5b7aa50 @nicolasff Partial rewrite, adding WebSockets, threads, pool.
authored
31 server_new(const char *cfg_file);
2c980a2 @nicolasff First try.
authored
32
5b7aa50 @nicolasff Partial rewrite, adding WebSockets, threads, pool.
authored
33 int
a8bccb4 @nicolasff Refactoring
authored
34 server_start(struct server *s);
35
282d900 @nicolasff Removed global variables.
authored
36 #endif
37
Something went wrong with that request. Please try again.