Mercurial > hg > nginx
comparison src/http/ngx_http_core_module.c @ 1377:0d57c150115b
set default listen() backlog to 511 on all platforms except FreeBSD
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 09 Aug 2007 13:32:21 +0000 |
parents | 7443fbe0b013 |
children | 3c6da0610f19 |
comparison
equal
deleted
inserted
replaced
1376:6ff8c0c1e194 | 1377:0d57c150115b |
---|---|
2217 /* STUB: getuid() should be cached */ | 2217 /* STUB: getuid() should be cached */ |
2218 ls->port = (getuid() == 0) ? 80 : 8000; | 2218 ls->port = (getuid() == 0) ? 80 : 8000; |
2219 #endif | 2219 #endif |
2220 ls->family = AF_INET; | 2220 ls->family = AF_INET; |
2221 | 2221 |
2222 ls->conf.backlog = -1; | 2222 ls->conf.backlog = NGX_LISTEN_BACKLOG; |
2223 ls->conf.rcvbuf = -1; | 2223 ls->conf.rcvbuf = -1; |
2224 ls->conf.sndbuf = -1; | 2224 ls->conf.sndbuf = -1; |
2225 } | 2225 } |
2226 | 2226 |
2227 if (conf->server_name.data == NULL) { | 2227 if (conf->server_name.data == NULL) { |
2568 ls->family = AF_INET; | 2568 ls->family = AF_INET; |
2569 ls->addr = u.addr.in_addr; | 2569 ls->addr = u.addr.in_addr; |
2570 ls->port = u.port; | 2570 ls->port = u.port; |
2571 ls->file_name = cf->conf_file->file.name; | 2571 ls->file_name = cf->conf_file->file.name; |
2572 ls->line = cf->conf_file->line; | 2572 ls->line = cf->conf_file->line; |
2573 ls->conf.backlog = -1; | 2573 ls->conf.backlog = NGX_LISTEN_BACKLOG; |
2574 ls->conf.rcvbuf = -1; | 2574 ls->conf.rcvbuf = -1; |
2575 ls->conf.sndbuf = -1; | 2575 ls->conf.sndbuf = -1; |
2576 | 2576 |
2577 n = ngx_inet_ntop(AF_INET, &ls->addr, ls->conf.addr, INET_ADDRSTRLEN + 6); | 2577 n = ngx_inet_ntop(AF_INET, &ls->addr, ls->conf.addr, INET_ADDRSTRLEN + 6); |
2578 ngx_sprintf(&ls->conf.addr[n], ":%ui", ls->port); | 2578 ngx_sprintf(&ls->conf.addr[n], ":%ui", ls->port); |