Mercurial > hg > nginx-quic
comparison src/stream/ngx_stream.h @ 6170:c13091e6292c
Stream: embed ngx_stream_listen_t into ngx_stream_conf_addr_t.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Mon, 08 Jun 2015 23:11:42 +0300 |
parents | f654addf0eea |
children | 3e8cddcff381 |
comparison
equal
deleted
inserted
replaced
6169:f654addf0eea | 6170:c13091e6292c |
---|---|
29 void **srv_conf; | 29 void **srv_conf; |
30 } ngx_stream_conf_ctx_t; | 30 } ngx_stream_conf_ctx_t; |
31 | 31 |
32 | 32 |
33 typedef struct { | 33 typedef struct { |
34 u_char sockaddr[NGX_SOCKADDRLEN]; | 34 union { |
35 struct sockaddr sockaddr; | |
36 struct sockaddr_in sockaddr_in; | |
37 #if (NGX_HAVE_INET6) | |
38 struct sockaddr_in6 sockaddr_in6; | |
39 #endif | |
40 #if (NGX_HAVE_UNIX_DOMAIN) | |
41 struct sockaddr_un sockaddr_un; | |
42 #endif | |
43 u_char sockaddr_data[NGX_SOCKADDRLEN]; | |
44 } u; | |
45 | |
35 socklen_t socklen; | 46 socklen_t socklen; |
36 | 47 |
37 /* server ctx */ | 48 /* server ctx */ |
38 ngx_stream_conf_ctx_t *ctx; | 49 ngx_stream_conf_ctx_t *ctx; |
39 | 50 |
94 ngx_array_t addrs; /* array of ngx_stream_conf_addr_t */ | 105 ngx_array_t addrs; /* array of ngx_stream_conf_addr_t */ |
95 } ngx_stream_conf_port_t; | 106 } ngx_stream_conf_port_t; |
96 | 107 |
97 | 108 |
98 typedef struct { | 109 typedef struct { |
99 struct sockaddr *sockaddr; | 110 ngx_stream_listen_t opt; |
100 socklen_t socklen; | |
101 | |
102 ngx_stream_conf_ctx_t *ctx; | |
103 | |
104 unsigned bind:1; | |
105 unsigned wildcard:1; | |
106 #if (NGX_STREAM_SSL) | |
107 unsigned ssl:1; | |
108 #endif | |
109 #if (NGX_HAVE_INET6 && defined IPV6_V6ONLY) | |
110 unsigned ipv6only:1; | |
111 #endif | |
112 #if (NGX_HAVE_REUSEPORT) | |
113 unsigned reuseport:1; | |
114 #endif | |
115 unsigned so_keepalive:2; | |
116 #if (NGX_HAVE_KEEPALIVE_TUNABLE) | |
117 int tcp_keepidle; | |
118 int tcp_keepintvl; | |
119 int tcp_keepcnt; | |
120 #endif | |
121 } ngx_stream_conf_addr_t; | 111 } ngx_stream_conf_addr_t; |
122 | 112 |
123 | 113 |
124 typedef struct { | 114 typedef struct { |
125 ngx_array_t servers; /* ngx_stream_core_srv_conf_t */ | 115 ngx_array_t servers; /* ngx_stream_core_srv_conf_t */ |