nginx_cycle

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
typedef struct        ngx_cycle_t;



struct {
void ****conf_ctx;
ngx_pool_t *pool; //内存池

ngx_log_t *log; //日志
ngx_log_t new_log;

ngx_connection_t **files; //连接文件
ngx_connection_t *free_connections; //空闲连接
ngx_uint_t free_connection_n; //空闲连接个数

ngx_queue_t reusable_connections_queue; //再利用连接队列

ngx_array_t listening; //监听数组
ngx_array_t pathes; //路径数组
ngx_list_t open_files; //打开文件链表
ngx_list_t shared_memory; //共享内存链表

ngx_uint_t connection_n; //连接个数
ngx_uint_t files_n; //打开文件个数

ngx_connection_t *connections; //连接
ngx_event_t *read_events; //读事件
ngx_event_t *write_events; //写事件

ngx_cycle_t *old_cycle; //old cycle指针

ngx_str_t conf_file; //配置文件
ngx_str_t conf_param; //配置参数
ngx_str_t conf_prefix; //配置前缀
ngx_str_t prefix; //前缀
ngx_str_t lock_file; //锁文件
ngx_str_t hostname; //主机名
};

各种数据结构关系图