]>
Commit | Line | Data |
---|---|---|
1 | /* | |
2 | * wsproc.h: An interface to the charybdis websocket helper daemon | |
3 | * Copyright (C) 2007 Aaron Sethman <androsyn@ratbox.org> | |
4 | * Copyright (C) 2007 ircd-ratbox development team | |
5 | * Copyright (C) 2016 William Pitcock <nenolod@dereferenced.org> | |
6 | * | |
7 | * This program is free software; you can redistribute it and/or modify | |
8 | * it under the terms of the GNU General Public License as published by | |
9 | * the Free Software Foundation; either version 2 of the License, or | |
10 | * (at your option) any later version. | |
11 | * | |
12 | * This program is distributed in the hope that it will be useful, | |
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | * GNU General Public License for more details. | |
16 | * | |
17 | * You should have received a copy of the GNU General Public License | |
18 | * along with this program; if not, write to the Free Software | |
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 | |
20 | * USA | |
21 | */ | |
22 | ||
23 | #ifndef INCLUDED_wsproc_h | |
24 | #define INCLUDED_wsproc_h | |
25 | ||
26 | struct ws_ctl; | |
27 | typedef struct ws_ctl ws_ctl_t; | |
28 | ||
29 | enum wsockd_status { | |
30 | WSOCKD_ACTIVE, | |
31 | WSOCKD_SHUTDOWN, | |
32 | WSOCKD_DEAD, | |
33 | }; | |
34 | ||
35 | void init_wsockd(void); | |
36 | void restart_wsockd(void); | |
37 | int start_wsockd(int count); | |
38 | ws_ctl_t *start_wsockd_accept(rb_fde_t *wsF, rb_fde_t *plainF, uint32_t id); | |
39 | void wsockd_decrement_clicount(ws_ctl_t *ctl); | |
40 | int get_wsockd_count(void); | |
41 | void wsockd_foreach_info(void (*func)(void *data, pid_t pid, int cli_count, enum wsockd_status status), void *data); | |
42 | ||
43 | #endif | |
44 |