增加简单的HTTP协议插件管理层,基本联通HTTP解析层与业务层插件。

This commit is contained in:
Lu Qiuwen
2018-09-17 15:44:44 +08:00
parent 9fec5c3cc4
commit 48c8d6a659
8 changed files with 439 additions and 212 deletions

View File

@@ -188,7 +188,7 @@ struct http_field_name
/* Standard Field */
enum tfe_http_std_field field_id;
/* Non-NULL when field_id is HTTP_UNKNOWN_FIELD */
char * field_name;
const char * field_name;
};
typedef void (http_session_begin_cb)(const struct tfe_stream * stream,
@@ -334,14 +334,23 @@ rpc_finish_cb_
};
*/
/* TODO: transfer these declaration to ht_frame.h */
struct ht_frame_session_ctx * http_frame_raise_session_begin(const tfe_stream * stream,
struct http_frame_plugin_status
{
void * pme;
unsigned int detached;
unsigned int preempt;
};
struct http_frame_session_ctx * http_frame_raise_session_begin(const tfe_stream * stream,
struct tfe_http_session * ht_session, unsigned int thread_id);
void http_frame_raise_session_end(struct ht_frame_session_ctx * ss_ctx, struct tfe_stream * stream,
void http_frame_raise_session_end(struct http_frame_session_ctx * ht_frame, struct tfe_stream * stream,
struct tfe_http_session * ht_session, unsigned int thread_id);
void http_frame_raise_event(struct ht_frame_session_ctx * ht_frame,
const tfe_stream * stream, struct tfe_http_session * ht_session, enum tfe_http_event event,
const unsigned char * data, size_t datalen, unsigned int thread_id);
void http_frame_raise_event(struct http_frame_session_ctx * ht_frame,
const struct tfe_stream * stream, struct tfe_http_session * ht_session, enum tfe_http_event event,
const unsigned char * data, size_t datalen, unsigned int thread_id)
void http_frame_currect_plugin_detach(struct http_frame_session_ctx * ht_frame);
int http_frame_currect_plugin_preempt(struct http_frame_session_ctx * ht_frame);