Mercurial > hg > nginx-quic
comparison src/http/ngx_http.c @ 57:a499e0d1f16e
nginx-0.0.1-2003-01-30-10:28:09 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 30 Jan 2003 07:28:09 +0000 |
parents | 058f01f78761 |
children | e8cdc2989cee |
comparison
equal
deleted
inserted
replaced
56:058f01f78761 | 57:a499e0d1f16e |
---|---|
1 | 1 |
2 #include <ngx_config.h> | 2 #include <ngx_config.h> |
3 | |
3 #include <ngx_string.h> | 4 #include <ngx_string.h> |
4 #include <ngx_socket.h> | 5 #include <ngx_socket.h> |
5 #include <ngx_listen.h> | 6 #include <ngx_listen.h> |
7 #include <ngx_inet.h> | |
6 #include <ngx_http.h> | 8 #include <ngx_http.h> |
7 #include <ngx_http_config.h> | 9 #include <ngx_http_config.h> |
8 #include <ngx_http_core_module.h> | 10 #include <ngx_http_core_module.h> |
9 | 11 |
10 | 12 |
322 NGX_CONF_ERROR); | 324 NGX_CONF_ERROR); |
323 | 325 |
324 ls->addr_text.len = | 326 ls->addr_text.len = |
325 ngx_snprintf(ls->addr_text.data | 327 ngx_snprintf(ls->addr_text.data |
326 + ngx_inet_ntop(AF_INET, | 328 + ngx_inet_ntop(AF_INET, |
327 &in_addr[a].addr, | 329 (char *) &in_addr[a].addr, |
328 ls->addr_text.data, | 330 ls->addr_text.data, |
329 INET_ADDRSTRLEN), | 331 INET_ADDRSTRLEN), |
330 6, ":%d", in_port[p].port); | 332 6, ":%d", in_port[p].port); |
331 | 333 |
332 ls->family = AF_INET; | 334 ls->family = AF_INET; |
343 ls->post_accept_timeout = ngx_http_post_accept_timeout; | 345 ls->post_accept_timeout = ngx_http_post_accept_timeout; |
344 ls->nonblocking = 1; | 346 ls->nonblocking = 1; |
345 | 347 |
346 ls->handler = ngx_http_init_connection; | 348 ls->handler = ngx_http_init_connection; |
347 ls->log = cf->log; | 349 ls->log = cf->log; |
350 ls->pool_size = ngx_http_connection_pool_size; | |
348 ls->ctx = ctx; | 351 ls->ctx = ctx; |
349 ls->servers = &in_port[p]; | 352 ls->servers = &in_port[p]; |
350 | 353 |
351 #if 0 | 354 #if 0 |
352 if (in_port[p].addr.nelts == 1) { | 355 if (in_port[p].addr.nelts == 1) { |
370 for (p = 0; p < in_ports.nelts; p++) { | 373 for (p = 0; p < in_ports.nelts; p++) { |
371 ngx_log_debug(cf->log, "port: %d" _ in_port[p].port); | 374 ngx_log_debug(cf->log, "port: %d" _ in_port[p].port); |
372 in_addr = (ngx_http_in_addr_t *) in_port[p].addr.elts; | 375 in_addr = (ngx_http_in_addr_t *) in_port[p].addr.elts; |
373 for (a = 0; a < in_port[p].addr.nelts; a++) { | 376 for (a = 0; a < in_port[p].addr.nelts; a++) { |
374 char ip[20]; | 377 char ip[20]; |
375 ngx_inet_ntop(AF_INET, &in_addr[a].addr, ip, 20); | 378 ngx_inet_ntop(AF_INET, (char *) &in_addr[a].addr, ip, 20); |
376 ngx_log_debug(cf->log, "%s %08x" _ ip _ in_addr[a].core_srv_conf); | 379 ngx_log_debug(cf->log, "%s %08x" _ ip _ in_addr[a].core_srv_conf); |
377 } | 380 } |
378 } | 381 } |
379 /**/ | 382 /**/ |
380 | 383 |