Mercurial > hg > nginx
comparison src/http/ngx_http_core_module.h @ 89:29bf798b583f
nginx-0.0.1-2003-05-15-19:42:53 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 15 May 2003 15:42:53 +0000 |
parents | 674d333f4296 |
children | 37530da31268 |
comparison
equal
deleted
inserted
replaced
88:674d333f4296 | 89:29bf798b583f |
---|---|
29 | 29 |
30 /* list of structures to find core_srv_conf quickly at run time */ | 30 /* list of structures to find core_srv_conf quickly at run time */ |
31 | 31 |
32 typedef struct { | 32 typedef struct { |
33 int port; | 33 int port; |
34 ngx_array_t addr; /* array of ngx_http_in_addr_t */ | 34 ngx_array_t addrs; /* array of ngx_http_in_addr_t */ |
35 } ngx_http_in_port_t; | 35 } ngx_http_in_port_t; |
36 | |
36 | 37 |
37 typedef struct { | 38 typedef struct { |
38 u_int32_t addr; | 39 u_int32_t addr; |
39 ngx_array_t names; /* array of ngx_http_server_name_t */ | 40 ngx_array_t names; /* array of ngx_http_server_name_t */ |
40 ngx_http_core_srv_conf_t *core_srv_conf; /* default server conf | 41 ngx_http_core_srv_conf_t *core_srv_conf; /* default server conf |
41 for this address:port */ | 42 for this address:port */ |
42 int flags; | 43 int flags; |
43 } ngx_http_in_addr_t; | 44 } ngx_http_in_addr_t; |
44 | 45 |
46 /* ngx_http_in_addr_t's flags */ | |
45 #define NGX_HTTP_DEFAULT_SERVER 1 | 47 #define NGX_HTTP_DEFAULT_SERVER 1 |
48 | |
46 | 49 |
47 typedef struct { | 50 typedef struct { |
48 ngx_str_t name; | 51 ngx_str_t name; |
49 ngx_http_core_srv_conf_t *core_srv_conf; /* virtual name server conf */ | 52 ngx_http_core_srv_conf_t *core_srv_conf; /* virtual name server conf */ |
50 } ngx_http_server_name_t; | 53 } ngx_http_server_name_t; |
52 | 55 |
53 #define NGX_HTTP_TYPES_HASH_PRIME 13 | 56 #define NGX_HTTP_TYPES_HASH_PRIME 13 |
54 | 57 |
55 #define ngx_http_types_hash_key(key, ext) \ | 58 #define ngx_http_types_hash_key(key, ext) \ |
56 { \ | 59 { \ |
57 int n; \ | 60 uint n; \ |
58 for (key = 0, n = 0; n < ext.len; n++) { \ | 61 for (key = 0, n = 0; n < ext.len; n++) { \ |
59 key += ext.data[n]; \ | 62 key += ext.data[n]; \ |
60 } \ | 63 } \ |
61 key %= NGX_HTTP_TYPES_HASH_PRIME; \ | 64 key %= NGX_HTTP_TYPES_HASH_PRIME; \ |
62 } | 65 } |
77 ngx_str_t doc_root; /* root */ | 80 ngx_str_t doc_root; /* root */ |
78 | 81 |
79 ngx_array_t *types; | 82 ngx_array_t *types; |
80 | 83 |
81 int sendfile; /* sendfile */ | 84 int sendfile; /* sendfile */ |
82 time_t send_timeout; /* send_timeout */ | 85 ngx_msec_t send_timeout; /* send_timeout */ |
83 size_t send_lowat; /* send_lowa */ | 86 size_t send_lowat; /* send_lowa */ |
84 size_t discarded_buffer_size; /* discarded_buffer_size */ | 87 size_t discarded_buffer_size; /* discarded_buffer_size */ |
85 time_t lingering_time; /* lingering_time */ | 88 ngx_msec_t lingering_time; /* lingering_time */ |
86 ngx_msec_t lingering_timeout; /* lingering_timeout */ | 89 ngx_msec_t lingering_timeout; /* lingering_timeout */ |
87 | 90 |
88 } ngx_http_core_loc_conf_t; | 91 } ngx_http_core_loc_conf_t; |
89 | 92 |
90 | 93 |