队列头文件ngx_queue.h#include #include #ifndef _NGX_QUEUE_H_INCLUDED_#define _NGX_QUEUE_H_INCLUDED_typedef struct ngx_queue_s ngx_queue_t;// 队列的节点,也直接表示队列....
分类:
其他好文 时间:
2014-10-22 18:06:22
阅读次数:
235
数组头文件ngx_array.h#include #include struct ngx_array_s { void *elts; ngx_uint_t nelts; size_t size; ngx_uint_t nalloc; n...
分类:
其他好文 时间:
2014-10-22 18:04:07
阅读次数:
224
还记得我们定义过一个结构体如下吗?typedef struct { ngx_str_t output_words;} ngx_http_hello_world_loc_conf_t;它就是 HelloWorld 的 location 组件配置,其中有一个字符串成员 output_words。1...
分类:
Web程序 时间:
2014-10-22 17:59:13
阅读次数:
289
ngx_palloc.h/* * NGX_MAX_ALLOC_FROM_POOL should be (ngx_pagesize - 1), i.e. 4095 on x86. * On Windows NT it decreases a number of locked pages in a ke...
分类:
其他好文 时间:
2014-10-22 17:58:17
阅读次数:
171
errno.h中的strerror(int errno)可以确定指定的errno的错误的提示信息。在 Nginx 中,将所有错误提示信息预先存储在一个数组里,而预先确定这个数组的大小,是在自动化脚本中完成的,如下是auto/unix脚本:(其中自动化脚本auto/feature的作用参考《解剖 Ng...
分类:
其他好文 时间:
2014-10-22 17:55:55
阅读次数:
167
1 auto/types/sizeof该脚本的功能,是通过测试程序获知给定的ngx_type的大小。1.1 显示提示信息echo $ngx_n "checking for $ngx_type size ...$ngx_c"cat > $NGX_AUTOCONF_ERR----------------...
分类:
其他好文 时间:
2014-10-22 17:43:42
阅读次数:
197
列表头文件ngx_list.h#ifndef _NGX_LIST_H_INCLUDED_#define _NGX_LIST_H_INCLUDED_#include #include typedef struct ngx_list_part_s ngx_list_part_t;// 一个 part ....
分类:
其他好文 时间:
2014-10-22 17:43:17
阅读次数:
230
elloWorld 是一个典型的 location 模块。什么是 location 模块?在 Nginx 中,根据作用域,有 main 模块、server 模块、location 模块。1 模块定义在 HelloWorld 模块中有一个 ngx_http_hello_world_module 变量,...
分类:
Web程序 时间:
2014-10-22 17:42:13
阅读次数:
276
1 命名规则1.1 基本变量基本变量有三个:ngx_module_t 类型的 ngx_http_foo_bar_module;ngx_command_t 类型的数组 ngx_http_foo_bar_commands;ngx_http_module_t 类型的 ngx_http_foo_bar_mo...
分类:
其他好文 时间:
2014-10-22 17:41:49
阅读次数:
258
ngx_radix_tree.h// 未被使用的节点#define NGX_RADIX_NO_VALUE (uintptr_t) -1typedef struct ngx_radix_node_s ngx_radix_node_t;struct ngx_radix_node_s { ng...
分类:
其他好文 时间:
2014-10-22 17:39:49
阅读次数:
208