Mercurial > hg > nginx-quic
diff src/http/ngx_http.c @ 3230:a7491af45540
http listen unix domain sockets
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 26 Oct 2009 11:43:32 +0000 |
parents | a632dc9f3e73 |
children | 8bd88de8fecd |
line wrap: on
line diff
--- a/src/http/ngx_http.c +++ b/src/http/ngx_http.c @@ -1128,6 +1128,12 @@ ngx_http_add_listen(ngx_conf_t *cf, ngx_ break; #endif +#if (NGX_HAVE_UNIX_DOMAIN) + case AF_UNIX: + p = 0; + break; +#endif + default: /* AF_INET */ sin = (struct sockaddr_in *) sa; p = sin->sin_port; @@ -1170,6 +1176,9 @@ ngx_http_add_addresses(ngx_conf_t *cf, n ngx_uint_t i, default_server; struct sockaddr *sa; ngx_http_conf_addr_t *addr; +#if (NGX_HAVE_UNIX_DOMAIN) + struct sockaddr_un *saun; +#endif /* * we can not compare whole sockaddr struct's as kernel @@ -1187,6 +1196,13 @@ ngx_http_add_addresses(ngx_conf_t *cf, n break; #endif +#if (NGX_HAVE_UNIX_DOMAIN) + case AF_UNIX: + off = offsetof(struct sockaddr_un, sun_path); + len = sizeof(saun->sun_path); + break; +#endif + default: /* AF_INET */ off = offsetof(struct sockaddr_in, sin_addr); len = 4;