set default listen() backlog to 511 on all platforms except FreeBSD
Igor Sysoev
14 years ago
122 | 122 | ntohs(sin->sin_port)) |
123 | 123 | - ls[i].addr_text.data; |
124 | 124 | |
125 | ls[i].backlog = -1; | |
125 | ls[i].backlog = NGX_LISTEN_BACKLOG; | |
126 | 126 | |
127 | 127 | olen = sizeof(int); |
128 | 128 |
2218 | 2218 | #endif |
2219 | 2219 | ls->family = AF_INET; |
2220 | 2220 | |
2221 | ls->conf.backlog = -1; | |
2221 | ls->conf.backlog = NGX_LISTEN_BACKLOG; | |
2222 | 2222 | ls->conf.rcvbuf = -1; |
2223 | 2223 | ls->conf.sndbuf = -1; |
2224 | 2224 | } |
2569 | 2569 | ls->port = u.port; |
2570 | 2570 | ls->file_name = cf->conf_file->file.name; |
2571 | 2571 | ls->line = cf->conf_file->line; |
2572 | ls->conf.backlog = -1; | |
2572 | ls->conf.backlog = NGX_LISTEN_BACKLOG; | |
2573 | 2573 | ls->conf.rcvbuf = -1; |
2574 | 2574 | ls->conf.sndbuf = -1; |
2575 | 2575 |
299 | 299 | return NGX_CONF_ERROR; |
300 | 300 | } |
301 | 301 | |
302 | ls->backlog = -1; | |
302 | ls->backlog = NGX_LISTEN_BACKLOG; | |
303 | 303 | ls->rcvbuf = -1; |
304 | 304 | ls->sndbuf = -1; |
305 | 305 |
76 | 76 | #endif |
77 | 77 | |
78 | 78 | |
79 | #define NGX_LISTEN_BACKLOG -1 | |
80 | ||
81 | ||
79 | 82 | #if (defined SO_ACCEPTFILTER && !defined NGX_HAVE_DEFERRED_ACCEPT) |
80 | 83 | #define NGX_HAVE_DEFERRED_ACCEPT 1 |
81 | 84 | #endif |
77 | 77 | #endif |
78 | 78 | |
79 | 79 | |
80 | #define NGX_LISTEN_BACKLOG 511 | |
81 | ||
82 | ||
80 | 83 | #if defined TCP_DEFER_ACCEPT && !defined NGX_HAVE_DEFERRED_ACCEPT |
81 | 84 | #define NGX_HAVE_DEFERRED_ACCEPT 1 |
82 | 85 | #endif |
87 | 87 | #endif |
88 | 88 | |
89 | 89 | |
90 | #define NGX_LISTEN_BACKLOG 511 | |
91 | ||
92 | ||
90 | 93 | #if (__FreeBSD__) && (__FreeBSD_version < 400017) |
91 | 94 | |
92 | 95 | #include <sys/param.h> /* ALIGN() */ |