增加HTTP解析层目录结构,增加插件自注册功能。

* 增加HTTP解析层目录结构,集成CMakeLists.txt编译文件;
* 调整编译顺序,先编译插件再编译平台;
* 增加TFE_PLUGIN_REGISTER宏,在TFE启动时自注册插件;
* 修改了stream_open接口,在插件流初始化接口不传入数据。
This commit is contained in:
Lu Qiuwen
2018-09-03 16:16:36 +08:00
parent 8ddb847224
commit 081d79416a
10 changed files with 208 additions and 73 deletions

View File

@@ -23,6 +23,7 @@
#include <tfe_stream.h>
#include <tfe_utils.h>
#include <tfe_future.h>
#include <tfe_plugin.h>
#include <platform.h>
#include <ssl_stream.h>
@@ -301,8 +302,7 @@ static void __stream_bev_readcb(struct bufferevent * bev, void * arg)
if (_stream->is_plugin_opened == 0)
{
action_tmp = plugins[i].on_open(&_stream->head, _stream->thread_ref->thread_id,
dir, contiguous_data, contigous_len, &(plug_ctx->pme));
plugins[i].on_open(&_stream->head, _stream->thread_ref->thread_id, dir, &(plug_ctx->pme));
_stream->is_plugin_opened = 1;
}
else