mirror of
https://github.com/boostorg/beast.git
synced 2025-07-31 21:34:46 +02:00
Add basic_parser_v1::reset
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
* Add is_Reader trait
|
||||
* Tidy up basic_headers for documentation
|
||||
* Tidy up documentation
|
||||
* Add basic_parser_v1::reset
|
||||
|
||||
API Changes:
|
||||
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -1175,6 +1175,16 @@ write_eof(error_code& ec)
|
||||
}
|
||||
}
|
||||
|
||||
template<bool isRequest, class Derived>
|
||||
void
|
||||
basic_parser_v1<isRequest, Derived>::
|
||||
reset()
|
||||
{
|
||||
h_left_ = h_max_;
|
||||
b_left_ = b_max_;
|
||||
reset(std::integral_constant<bool, isRequest>{});
|
||||
}
|
||||
|
||||
template<bool isRequest, class Derived>
|
||||
bool
|
||||
basic_parser_v1<isRequest, Derived>::
|
||||
|
Reference in New Issue
Block a user