Add basic_parser_v1::reset

This commit is contained in:
Vinnie Falco
2016-10-20 17:22:38 -04:00
parent 658e03ca35
commit 9353d043b0
3 changed files with 20 additions and 8 deletions
+9 -8
View File
@@ -467,6 +467,15 @@ public:
void
write_eof(error_code& ec);
protected:
/** Reset the parsing state.
The state of the parser is reset to expect the beginning of
a new request or response. The old state is discarded.
*/
void
reset();
private:
Derived&
impl()
@@ -486,14 +495,6 @@ private:
s_ = s_res_start;
}
void
reset()
{
h_left_ = h_max_;
b_left_ = b_max_;
reset(std::integral_constant<bool, isRequest>{});
}
void
init(std::true_type)
{