comparison src/http/ngx_http_core_module.h @ 3220:cdcd9e29c589

*) move sockaddr to the listen options *) rename ngx_http_listen_t to ngx_http_listen_opt_t
author Igor Sysoev <igor@sysoev.ru>
date Wed, 21 Oct 2009 16:47:44 +0000
parents 81b8416054b0
children c8de5a8b6d17
comparison
equal deleted inserted replaced
3219:81b8416054b0 3220:cdcd9e29c589
41 typedef struct ngx_http_location_tree_node_s ngx_http_location_tree_node_t; 41 typedef struct ngx_http_location_tree_node_s ngx_http_location_tree_node_t;
42 typedef struct ngx_http_core_loc_conf_s ngx_http_core_loc_conf_t; 42 typedef struct ngx_http_core_loc_conf_s ngx_http_core_loc_conf_t;
43 43
44 44
45 typedef struct { 45 typedef struct {
46 u_char sockaddr[NGX_SOCKADDRLEN];
47 socklen_t socklen;
48
46 unsigned default_server:1; 49 unsigned default_server:1;
47 unsigned bind:1; 50 unsigned bind:1;
48 unsigned wildcard:1; 51 unsigned wildcard:1;
49 #if (NGX_HTTP_SSL) 52 #if (NGX_HTTP_SSL)
50 unsigned ssl:1; 53 unsigned ssl:1;
66 69
67 u_char addr[NGX_SOCKADDR_STRLEN + 1]; 70 u_char addr[NGX_SOCKADDR_STRLEN + 1];
68 } ngx_http_listen_opt_t; 71 } ngx_http_listen_opt_t;
69 72
70 73
71 typedef struct {
72 u_char sockaddr[NGX_SOCKADDRLEN];
73 socklen_t socklen;
74
75 ngx_http_listen_opt_t opt;
76 } ngx_http_listen_t;
77
78
79 typedef enum { 74 typedef enum {
80 NGX_HTTP_POST_READ_PHASE = 0, 75 NGX_HTTP_POST_READ_PHASE = 0,
81 76
82 NGX_HTTP_SERVER_REWRITE_PHASE, 77 NGX_HTTP_SERVER_REWRITE_PHASE,
83 78
221 ngx_array_t addrs; /* array of ngx_http_conf_addr_t */ 216 ngx_array_t addrs; /* array of ngx_http_conf_addr_t */
222 } ngx_http_conf_port_t; 217 } ngx_http_conf_port_t;
223 218
224 219
225 typedef struct { 220 typedef struct {
226 u_char sockaddr[NGX_SOCKADDRLEN]; 221 ngx_http_listen_opt_t opt;
227 socklen_t socklen;
228 222
229 ngx_hash_t hash; 223 ngx_hash_t hash;
230 ngx_hash_wildcard_t *wc_head; 224 ngx_hash_wildcard_t *wc_head;
231 ngx_hash_wildcard_t *wc_tail; 225 ngx_hash_wildcard_t *wc_tail;
232 226
236 #endif 230 #endif
237 231
238 /* the default server configuration for this address:port */ 232 /* the default server configuration for this address:port */
239 ngx_http_core_srv_conf_t *core_srv_conf; 233 ngx_http_core_srv_conf_t *core_srv_conf;
240 ngx_array_t servers; /* array of ngx_http_core_srv_conf_t */ 234 ngx_array_t servers; /* array of ngx_http_core_srv_conf_t */
241
242 ngx_http_listen_opt_t opt;
243 } ngx_http_conf_addr_t; 235 } ngx_http_conf_addr_t;
244 236
245 237
246 struct ngx_http_server_name_s { 238 struct ngx_http_server_name_s {
247 #if (NGX_PCRE) 239 #if (NGX_PCRE)