STREAM挂起时记录挂起来源,在RESUME()触发对应连接方向的读事件。HTTP SUSPEND/RESUME功能初步调通

This commit is contained in:
Lu Qiuwen
2018-10-14 20:29:52 +08:00
parent 294201ecd8
commit e9c11824b0
6 changed files with 37 additions and 4 deletions

View File

@@ -102,6 +102,18 @@ enum tfe_stream_action __http_connection_entry_on_request(const struct tfe_strea
hs_private->suspend_event = (enum tfe_http_event)0;
hs_private->suspend_tag_effective = false;
hs_private->suspend_tag_user = false;
if (hf_private_req_in->is_user_stream_action_set)
{
hf_private_req_in->stream_action = hf_private_req_in->user_stream_action;
}
else
{
hf_private_req_in->stream_action = ACTION_FORWARD_DATA;
}
/* Ignore parse the content which is nullptr. */
return hf_private_req_in->stream_action;
}
/* Parse the content, the data which in defered state has been ignored. */
@@ -126,7 +138,7 @@ enum tfe_stream_action __http_connection_entry_on_request(const struct tfe_strea
hs_private->suspend_tag_effective = true;
/* Suspend TCP stream */
tfe_stream_suspend(stream);
tfe_stream_suspend(stream, CONN_DIR_DOWNSTREAM);
return ACTION_DEFER_DATA;
}