Mercurial > hg > nginx
comparison src/event/ngx_event.c @ 102:7e86d028d8f0
nginx-0.0.1-2003-06-06-18:59:20 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 06 Jun 2003 14:59:20 +0000 |
parents | 70d2345a903f |
children | 6dfda4cf5200 |
comparison
equal
deleted
inserted
replaced
101:2e069b6e6920 | 102:7e86d028d8f0 |
---|---|
4 #include <ngx_listen.h> | 4 #include <ngx_listen.h> |
5 #include <ngx_connection.h> | 5 #include <ngx_connection.h> |
6 #include <ngx_event.h> | 6 #include <ngx_event.h> |
7 | 7 |
8 | 8 |
9 #define DEF_CONNECTIONS 1024 | 9 #define DEF_CONNECTIONS 512 |
10 | 10 |
11 | 11 |
12 extern ngx_module_t ngx_select_module; | 12 extern ngx_module_t ngx_select_module; |
13 | 13 |
14 #if (HAVE_KQUEUE) | 14 #if (HAVE_KQUEUE) |
365 { | 365 { |
366 ngx_event_conf_t *ecf = conf; | 366 ngx_event_conf_t *ecf = conf; |
367 | 367 |
368 #if (HAVE_KQUEUE) | 368 #if (HAVE_KQUEUE) |
369 | 369 |
370 #if 0 | |
371 if (ecf->connections != NGX_CONF_UNSET) { | |
372 ecf->connections = (ngx_max_connections < DEF_CONNECTIONS) ? | |
373 ngx_max_connections : DEF_CONNECTIONS; | |
374 | |
375 } else if (ecf->connections > ngx_max_connections) { | |
376 } | |
377 #endif | |
378 | |
379 ngx_conf_init_value(ecf->connections, DEF_CONNECTIONS); | 370 ngx_conf_init_value(ecf->connections, DEF_CONNECTIONS); |
380 ngx_conf_init_value(ecf->use, ngx_kqueue_module.ctx_index); | 371 ngx_conf_init_value(ecf->use, ngx_kqueue_module.ctx_index); |
381 | 372 |
382 #elif (HAVE_DEVPOLL) | 373 #elif (HAVE_DEVPOLL) |
383 | 374 |
391 | 382 |
392 ngx_conf_init_value(ecf->use, ngx_select_module.ctx_index); | 383 ngx_conf_init_value(ecf->use, ngx_select_module.ctx_index); |
393 | 384 |
394 #endif | 385 #endif |
395 | 386 |
387 #if (WIN32) | |
388 /* | |
389 * Winsock assignes a socket number according to 4 * N + M, | |
390 * where M is the constant 32 (98SE), 88 (NT) or 100 (W2K). | |
391 * So to find a connection we divide a socket number by 4. | |
392 */ | |
393 #endif | |
394 | |
396 ngx_conf_init_value(ecf->timer_queues, 10); | 395 ngx_conf_init_value(ecf->timer_queues, 10); |
397 | 396 |
398 return NGX_CONF_OK; | 397 return NGX_CONF_OK; |
399 } | 398 } |