xref: /unit/src/nxt_main_process.h (revision 240)
1*240Sigor@sysoev.ru 
2*240Sigor@sysoev.ru /*
3*240Sigor@sysoev.ru  * Copyright (C) Igor Sysoev
4*240Sigor@sysoev.ru  * Copyright (C) NGINX, Inc.
5*240Sigor@sysoev.ru  */
6*240Sigor@sysoev.ru 
7*240Sigor@sysoev.ru #ifndef _NXT_MAIN_PROCESS_H_INCLUDED_
8*240Sigor@sysoev.ru #define _NXT_MAIN_PROCESS_H_INCLUDED_
9*240Sigor@sysoev.ru 
10*240Sigor@sysoev.ru 
11*240Sigor@sysoev.ru typedef enum {
12*240Sigor@sysoev.ru     NXT_SOCKET_ERROR_SYSTEM = 0,
13*240Sigor@sysoev.ru     NXT_SOCKET_ERROR_NOINET6,
14*240Sigor@sysoev.ru     NXT_SOCKET_ERROR_PORT,
15*240Sigor@sysoev.ru     NXT_SOCKET_ERROR_INUSE,
16*240Sigor@sysoev.ru     NXT_SOCKET_ERROR_NOADDR,
17*240Sigor@sysoev.ru     NXT_SOCKET_ERROR_ACCESS,
18*240Sigor@sysoev.ru     NXT_SOCKET_ERROR_PATH,
19*240Sigor@sysoev.ru } nxt_socket_error_t;
20*240Sigor@sysoev.ru 
21*240Sigor@sysoev.ru 
22*240Sigor@sysoev.ru nxt_int_t nxt_main_process_start(nxt_thread_t *thr, nxt_task_t *task,
23*240Sigor@sysoev.ru     nxt_runtime_t *runtime);
24*240Sigor@sysoev.ru void nxt_main_stop_worker_processes(nxt_task_t *task, nxt_runtime_t *runtime);
25*240Sigor@sysoev.ru 
26*240Sigor@sysoev.ru nxt_int_t nxt_controller_start(nxt_task_t *task, void *data);
27*240Sigor@sysoev.ru nxt_int_t nxt_router_start(nxt_task_t *task, void *data);
28*240Sigor@sysoev.ru nxt_int_t nxt_discovery_start(nxt_task_t *task, void *data);
29*240Sigor@sysoev.ru nxt_int_t nxt_app_start(nxt_task_t *task, void *data);
30*240Sigor@sysoev.ru 
31*240Sigor@sysoev.ru extern nxt_port_handler_t  nxt_controller_process_port_handlers[];
32*240Sigor@sysoev.ru extern nxt_port_handler_t  nxt_worker_process_port_handlers[];
33*240Sigor@sysoev.ru extern nxt_port_handler_t  nxt_discovery_process_port_handlers[];
34*240Sigor@sysoev.ru extern nxt_port_handler_t  nxt_app_process_port_handlers[];
35*240Sigor@sysoev.ru extern nxt_port_handler_t  nxt_router_process_port_handlers[];
36*240Sigor@sysoev.ru extern const nxt_sig_event_t  nxt_main_process_signals[];
37*240Sigor@sysoev.ru extern const nxt_sig_event_t  nxt_worker_process_signals[];
38*240Sigor@sysoev.ru 
39*240Sigor@sysoev.ru 
40*240Sigor@sysoev.ru #endif /* _NXT_MAIN_PROCESS_H_INCLUDED_ */
41