Mercurial > hg > nginx-quic
comparison src/stream/ngx_stream.h @ 6559:adf25b8d0431
Introduced the ngx_sockaddr_t type.
It's properly aligned and can hold any supported sockaddr.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Mon, 23 May 2016 16:37:20 +0300 |
parents | 6f8254ae61b8 |
children | c90cf79d0e1d |
comparison
equal
deleted
inserted
replaced
6558:68854ce64ec7 | 6559:adf25b8d0431 |
---|---|
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 union { | 34 ngx_sockaddr_t u; |
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; | |
44 | |
45 socklen_t socklen; | 35 socklen_t socklen; |
46 | 36 |
47 /* server ctx */ | 37 /* server ctx */ |
48 ngx_stream_conf_ctx_t *ctx; | 38 ngx_stream_conf_ctx_t *ctx; |
49 | 39 |