1 Star 2 Fork 1

Barry / tcp-nginx-module

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
ngx_tcp_cmd_module.h 1.26 KB
AI 代码解读
一键复制 编辑 原始数据 按行查看 历史
caizhihua 提交于 2014-09-14 22:15 . add command package filter support
#ifndef _NGX_TCP_CMD_MODULE_H_INCLUDED_
#define _NGX_TCP_CMD_MODULE_H_INCLUDED_
#include <ngx_config.h>
#include <ngx_core.h>
#include <ngx_tcp.h>
#include <ngx_map.h>
typedef struct {
size_t max_pkg_size;
} ngx_tcp_cmd_srv_conf_t;
typedef struct {
ngx_tcp_session_t parent;
unsigned pkghead_parsed:1;
} ngx_tcp_cmd_session_t;
typedef struct {
ngx_rbtree_t rbtree;
ngx_rbtree_node_t sentinel;
} ngx_tcp_cmdpkg_handler_mgr_t;
typedef struct {
ngx_tcp_cmdpkg_handler_mgr_t pkg_handler_mgr;
ngx_array_t cmdsos; /* ngx_tcp_cmdso_t array */
} ngx_tcp_cmdso_mgr_t;
ngx_int_t ngx_tcp_cmd_conf_get_str(const char *section,
const char *k, char **v);
ngx_tcp_session_t *ngx_tcp_cmd_create_session(ngx_connection_t *c);
void ngx_tcp_cmd_init_session(ngx_tcp_session_t *s, ngx_connection_t *c);
void ngx_tcp_cmd_finit_session(ngx_tcp_session_t *s);
void ngx_tcp_cmd_init_protocol(ngx_event_t *rev);
ngx_int_t ngx_tcp_cmd_parse_pkg(ngx_tcp_session_t *s);
cmdpkg_handler_pt ngx_tcp_cmd_lookup_pkg_handler(uint32_t cmd);
extern ngx_tcp_cmdso_mgr_t *cmdso_mgr;
extern ngx_map_t *cmdso_conf;
extern ngx_module_t ngx_tcp_cmd_module;
#endif /* _NGX_TCP_CMD_MODULE_H_INCLUDED_ */
C
1
https://gitee.com/Barryda/tcp-nginx-module.git
git@gitee.com:Barryda/tcp-nginx-module.git
Barryda
tcp-nginx-module
tcp-nginx-module
master

搜索帮助