Mercurial > hg > nginx
comparison src/event/modules/ngx_select_module.c @ 96:a23d010f356d
nginx-0.0.1-2003-05-27-16:18:54 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 27 May 2003 12:18:54 +0000 |
parents | 19cc647ecd91 |
children | 7e86d028d8f0 |
comparison
equal
deleted
inserted
replaced
95:b48066122884 | 96:a23d010f356d |
---|---|
38 | 38 |
39 | 39 |
40 static ngx_str_t select_name = ngx_string("select"); | 40 static ngx_str_t select_name = ngx_string("select"); |
41 | 41 |
42 ngx_event_module_t ngx_select_module_ctx = { | 42 ngx_event_module_t ngx_select_module_ctx = { |
43 NGX_EVENT_MODULE, | |
44 &select_name, | 43 &select_name, |
45 NULL, /* create configuration */ | 44 NULL, /* create configuration */ |
46 ngx_select_init_conf, /* init configuration */ | 45 ngx_select_init_conf, /* init configuration */ |
47 | 46 |
48 { | 47 { |
58 } | 57 } |
59 | 58 |
60 }; | 59 }; |
61 | 60 |
62 ngx_module_t ngx_select_module = { | 61 ngx_module_t ngx_select_module = { |
62 NGX_MODULE, | |
63 &ngx_select_module_ctx, /* module context */ | 63 &ngx_select_module_ctx, /* module context */ |
64 0, /* module index */ | |
65 NULL, /* module directives */ | 64 NULL, /* module directives */ |
66 NGX_EVENT_MODULE_TYPE, /* module type */ | 65 NGX_EVENT_MODULE, /* module type */ |
67 NULL /* init module */ | 66 NULL /* init module */ |
68 }; | 67 }; |
69 | 68 |
70 | 69 |
71 static int ngx_select_init(ngx_log_t *log) | 70 static int ngx_select_init(ngx_log_t *log) |
72 { | 71 { |
73 ngx_event_conf_t *ecf; | 72 ngx_event_conf_t *ecf; |
74 | 73 |
75 ecf = ngx_event_get_conf(ngx_event_module_ctx); | 74 ecf = ngx_event_get_conf(ngx_event_module); |
76 | 75 |
77 FD_ZERO(&master_read_fd_set); | 76 FD_ZERO(&master_read_fd_set); |
78 FD_ZERO(&master_write_fd_set); | 77 FD_ZERO(&master_write_fd_set); |
79 | 78 |
80 ngx_test_null(event_index, | 79 ngx_test_null(event_index, |
376 | 375 |
377 static char *ngx_select_init_conf(ngx_pool_t *pool, void *conf) | 376 static char *ngx_select_init_conf(ngx_pool_t *pool, void *conf) |
378 { | 377 { |
379 ngx_event_conf_t *ecf; | 378 ngx_event_conf_t *ecf; |
380 | 379 |
381 ecf = ngx_event_get_conf(ngx_event_module_ctx); | 380 ecf = ngx_event_get_conf(ngx_event_module); |
382 | 381 |
383 if (ecf->connections > FD_SETSIZE) { | 382 if (ecf->connections > FD_SETSIZE) { |
384 return "maximum number of connections " | 383 return "maximum number of connections " |
385 "supported by select() is " ngx_value(FD_SETSIZE); | 384 "supported by select() is " ngx_value(FD_SETSIZE); |
386 } | 385 } |