Mercurial > hg > nginx
comparison src/http/ngx_http_core_module.h @ 7478:4f9b72a229c1
Multiple addresses in "listen".
Previously only one address was used by the listen directive handler even if
host name resolved to multiple addresses. Now a separate listening socket is
created for each address.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Fri, 15 Mar 2019 15:45:56 +0300 |
parents | 7f955d3b9a0d |
children | c19ca381b2e6 |
comparison
equal
deleted
inserted
replaced
7477:c74904a17021 | 7478:4f9b72a229c1 |
---|---|
63 typedef struct ngx_http_location_tree_node_s ngx_http_location_tree_node_t; | 63 typedef struct ngx_http_location_tree_node_s ngx_http_location_tree_node_t; |
64 typedef struct ngx_http_core_loc_conf_s ngx_http_core_loc_conf_t; | 64 typedef struct ngx_http_core_loc_conf_s ngx_http_core_loc_conf_t; |
65 | 65 |
66 | 66 |
67 typedef struct { | 67 typedef struct { |
68 ngx_sockaddr_t sockaddr; | 68 struct sockaddr *sockaddr; |
69 socklen_t socklen; | 69 socklen_t socklen; |
70 ngx_str_t addr_text; | |
70 | 71 |
71 unsigned set:1; | 72 unsigned set:1; |
72 unsigned default_server:1; | 73 unsigned default_server:1; |
73 unsigned bind:1; | 74 unsigned bind:1; |
74 unsigned wildcard:1; | 75 unsigned wildcard:1; |
98 #endif | 99 #endif |
99 | 100 |
100 #if (NGX_HAVE_DEFERRED_ACCEPT && defined SO_ACCEPTFILTER) | 101 #if (NGX_HAVE_DEFERRED_ACCEPT && defined SO_ACCEPTFILTER) |
101 char *accept_filter; | 102 char *accept_filter; |
102 #endif | 103 #endif |
103 | |
104 u_char addr[NGX_SOCKADDR_STRLEN + 1]; | |
105 } ngx_http_listen_opt_t; | 104 } ngx_http_listen_opt_t; |
106 | 105 |
107 | 106 |
108 typedef enum { | 107 typedef enum { |
109 NGX_HTTP_POST_READ_PHASE = 0, | 108 NGX_HTTP_POST_READ_PHASE = 0, |