sock: in listen_sock(), add debug message when socket() call failed.
[obnox/tinyproxy.git] / src / child.h
1 /* tinyproxy - A fast light-weight HTTP proxy
2  * Copyright (C) 2002 Robert James Kaes <rjkaes@users.sourceforge.net>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18
19 /* See 'child.c' for detailed information. */
20
21 #ifndef TINYPROXY_CHILD_H
22 #define TINYPROXY_CHILD_H
23
24 typedef enum {
25         CHILD_MAXCLIENTS,
26         CHILD_MAXSPARESERVERS,
27         CHILD_MINSPARESERVERS,
28         CHILD_STARTSERVERS,
29         CHILD_MAXREQUESTSPERCHILD
30 } child_config_t;
31
32 extern short int child_pool_create (void);
33 extern int child_listening_sock (const char *addr, uint16_t port);
34 extern void child_close_sock (void);
35 extern void child_main_loop (void);
36 extern void child_kill_children (int sig);
37
38 extern short int child_configure (child_config_t type, unsigned int val);
39
40 #endif