Klaus Demo nginx / 031a6e2
set default listen() backlog to 511 on all platforms except FreeBSD Igor Sysoev 14 years ago
8 changed file(s) with 19 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
122122 ntohs(sin->sin_port))
123123 - ls[i].addr_text.data;
124124
125 ls[i].backlog = -1;
125 ls[i].backlog = NGX_LISTEN_BACKLOG;
126126
127127 olen = sizeof(int);
128128
22182218 #endif
22192219 ls->family = AF_INET;
22202220
2221 ls->conf.backlog = -1;
2221 ls->conf.backlog = NGX_LISTEN_BACKLOG;
22222222 ls->conf.rcvbuf = -1;
22232223 ls->conf.sndbuf = -1;
22242224 }
25692569 ls->port = u.port;
25702570 ls->file_name = cf->conf_file->file.name;
25712571 ls->line = cf->conf_file->line;
2572 ls->conf.backlog = -1;
2572 ls->conf.backlog = NGX_LISTEN_BACKLOG;
25732573 ls->conf.rcvbuf = -1;
25742574 ls->conf.sndbuf = -1;
25752575
299299 return NGX_CONF_ERROR;
300300 }
301301
302 ls->backlog = -1;
302 ls->backlog = NGX_LISTEN_BACKLOG;
303303 ls->rcvbuf = -1;
304304 ls->sndbuf = -1;
305305
7676 #endif
7777
7878
79 #define NGX_LISTEN_BACKLOG -1
80
81
7982 #if (defined SO_ACCEPTFILTER && !defined NGX_HAVE_DEFERRED_ACCEPT)
8083 #define NGX_HAVE_DEFERRED_ACCEPT 1
8184 #endif
7777 #endif
7878
7979
80 #define NGX_LISTEN_BACKLOG 511
81
82
8083 #if defined TCP_DEFER_ACCEPT && !defined NGX_HAVE_DEFERRED_ACCEPT
8184 #define NGX_HAVE_DEFERRED_ACCEPT 1
8285 #endif
8787 #endif
8888
8989
90 #define NGX_LISTEN_BACKLOG 511
91
92
9093 #if (__FreeBSD__) && (__FreeBSD_version < 400017)
9194
9295 #include <sys/param.h> /* ALIGN() */
8181 #endif
8282
8383
84 #define NGX_LISTEN_BACKLOG 511
85
86
8487 #ifndef NGX_HAVE_INHERITED_NONBLOCK
8588 #define NGX_HAVE_INHERITED_NONBLOCK 1
8689 #endif
148148 #define NGX_WIN_NT 200000
149149
150150
151 #define NGX_LISTEN_BACKLOG 511
152
153
151154 #ifndef NGX_HAVE_INHERITED_NONBLOCK
152155 #define NGX_HAVE_INHERITED_NONBLOCK 1
153156 #endif