#34 增加HTTP解析层的Suspend/Resume语义及对应的虚接口定义

This commit is contained in:
Lu Qiuwen
2018-10-09 17:57:42 +08:00
committed by zhengchao
parent 70fbff5b7d
commit adb469395c

View File

@@ -230,6 +230,8 @@ struct tfe_http_session_ops
struct tfe_http_session * (* ops_allow_write)(const struct tfe_http_session * session);
void (* ops_detach)(const struct tfe_http_session * session);
void (* ops_drop)(struct tfe_http_session * session);
void (* ops_suspend)(struct tfe_http_session * session);
void (* ops_resume)(struct tfe_http_session * session);
void (* ops_request_set)(struct tfe_http_session * session, struct tfe_http_half * req);
void (* ops_response_set)(struct tfe_http_session * session, struct tfe_http_half * resp);
@@ -344,6 +346,16 @@ static inline void tfe_http_session_drop(struct tfe_http_session * session)
return session->ops->ops_drop(session);
}
static inline void tfe_http_session_suspend(struct tfe_http_session * session)
{
return session->ops->ops_suspend(session);
}
static inline void tfe_http_session_resume(struct tfe_http_session * session)
{
return session->ops->ops_resume(session);
}
static inline void tfe_http_session_request_set(struct tfe_http_session * session, struct tfe_http_half * req)
{
return session->ops->ops_request_set(session, req);