From c5d59dfb94493eea0d1512f957047cefea6a8ef0 Mon Sep 17 00:00:00 2001 From: chronolaw Date: Sun, 18 Dec 2016 10:55:55 +0800 Subject: [PATCH] ngx_event.c --- nginx/src/event/ngx_event.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nginx/src/event/ngx_event.c b/nginx/src/event/ngx_event.c index ad5e141c..35ea23b8 100644 --- a/nginx/src/event/ngx_event.c +++ b/nginx/src/event/ngx_event.c @@ -949,6 +949,7 @@ ngx_event_process_init(ngx_cycle_t *cycle) } } + // poll, /dev/poll进入这个分支处理 if (ngx_event_flags & NGX_USE_FD_EVENT) { struct rlimit rlmt; @@ -1067,9 +1068,12 @@ ngx_event_process_init(ngx_cycle_t *cycle) c->type = ls[i].type; c->log = &ls[i].log; + // 连接的listening对象 + // 两者相互连接 c->listening = &ls[i]; ls[i].connection = c; + // 监听端口只关心读事件 rev = c->read; rev->log = c->log;