摘要: 在 http 配置块中,我们配置了 http 连接相关的信息,HTTP 框架也正是从这里启动的 在 nginx 初始化的过程中,执行了 ngx_init_cycle 函数,其中进行了配置文件解析,调用了 ngx_conf_parse 函数 函数 ngx_conf_handler 根据配置项的 com 阅读全文
posted @ 2020-01-05 22:56 codestacklinuxer 阅读(441) 评论(0) 推荐(0) 编辑
摘要: tcp 三次握手成功后,listen fd 可读,在process_event_timer 中调用rev->handler(rev)处理; 其回调函数为: ngx_event_accept /* 如何建立新连接 上文提刭过,处理新连接事件的回调函数是ngx_event_accept,其原型如下。vo 阅读全文
posted @ 2020-01-05 20:33 codestacklinuxer 阅读(400) 评论(0) 推荐(0) 编辑
摘要: 1. epoll模块命令集 ngx_epoll_commands epoll模块上下文 ngx_epoll_module_ctx epoll模块配置 ngx_epoll_module static ngx_command_t ngx_epoll_commands[] = { /* 在调用epoll_ 阅读全文
posted @ 2020-01-05 20:03 codestacklinuxer 阅读(633) 评论(0) 推荐(0) 编辑
摘要: | (ngx_worker_process_cycle->ngx_worker_process_init) | >for(;;) {ngx_process_events_and_timers()} ngx_start_worker_processes | ngx_processes[]相关的操作赋值 阅读全文
posted @ 2020-01-05 19:46 codestacklinuxer 阅读(535) 评论(0) 推荐(0) 编辑