From adb469395c59559dacd86d12b19ecb0d94ea2103 Mon Sep 17 00:00:00 2001 From: Lu Qiuwen Date: Tue, 9 Oct 2018 17:57:42 +0800 Subject: [PATCH] =?UTF-8?q?#34=20=E5=A2=9E=E5=8A=A0HTTP=E8=A7=A3=E6=9E=90?= =?UTF-8?q?=E5=B1=82=E7=9A=84Suspend/Resume=E8=AF=AD=E4=B9=89=E5=8F=8A?= =?UTF-8?q?=E5=AF=B9=E5=BA=94=E7=9A=84=E8=99=9A=E6=8E=A5=E5=8F=A3=E5=AE=9A?= =?UTF-8?q?=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/include/tfe_http.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/common/include/tfe_http.h b/common/include/tfe_http.h index 7cf158b..7c58112 100644 --- a/common/include/tfe_http.h +++ b/common/include/tfe_http.h @@ -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);