首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 开源软件 >

nginx 模块结成

2012-07-26 
nginx 模块组成编写模块,需要实现下面5个部分 定义 ngx_module_t 模块结构体 定义commands 定义cxn 实现co

nginx 模块组成
编写模块,需要实现下面5个部分
定义 ngx_module_t 模块结构体 定义commands 定义cxn 实现commands里对应的实现函数 实现handler函数 (command实现函数依赖handler函数)  (这个才是真正干活的)

说明各个函数部分的意义

commandseg:

ngx_module_t  ngx_http_circle_gif_module = {                    NGX_MODULE_V1,                                              &ngx_http_circle_gif_module_ctx, /* module context */       ngx_http_circle_gif_commands,   /* module directives */     NGX_HTTP_MODULE,               /* module type */            NULL,                                     /* init master */            NULL,                                    /* init module */            NULL,                                   /* init process */           NULL,                          /* init thread */            NULL,                          /* exit thread */            NULL,                          /* exit process */           NULL,                          /* exit master */            NGX_MODULE_V1_PADDING                                   };                                                          

热点排行