Tidy up basic_parser javadocs

This commit is contained in:
Vinnie Falco
2017-05-05 14:49:16 -07:00
parent 84ece031f2
commit 46097c7dab
3 changed files with 15 additions and 40 deletions

View File

@@ -2,6 +2,10 @@
* Use beast::string_view alias
HTTP
* Tidy up basic_parser javadocs
WebSocket:
* Add websocket async echo ssl server test:

View File

@@ -509,12 +509,15 @@ public:
/** Returns a set of buffers for storing body data.
@note This member function is only available when
`isDirect==true`.
@param buffers A writable output parameter into which
the function will place the buffers upon success.
@param limit The maximum number of bytes in the
size of the returned buffer sequence. The actual size
of the buffer sequence may be lower than this number.
@note This member function is only available when
`isDirect==true`.
*/
template<class MutableBufferSequence>
void
@@ -523,6 +526,10 @@ public:
/** Commit body data.
@param n The number of bytes to commit. This must
be less than or equal to the size of the buffer
sequence returned by @ref prepare_body.
@note This member function is only available when
`isDirect==true`.
*/
@@ -530,6 +537,8 @@ public:
commit_body(std::size_t n);
/** Indicate that body octets have been consumed.
@param n The number of bytes to consume.
*/
void
consume(std::size_t n)
@@ -548,16 +557,6 @@ public:
}
}
/** Consume all remaining body data.
This function instructs the parser to advance the
state past any expected body octets. Callers who
wish to read and process the body themselves will
call this function.
*/
void
consume_body(error_code& ec);
private:
inline
Derived&

View File

@@ -230,34 +230,6 @@ commit_body(std::size_t n)
}
}
template<bool isRequest, bool isDirect, class Derived>
void
basic_parser<isRequest, isDirect, Derived>::
consume_body(error_code& ec)
{
BOOST_ASSERT(
state_ == parse_state::body ||
state_ == parse_state::body_to_eof ||
state_ == parse_state::chunk_body);
switch(state_)
{
case parse_state::body:
case parse_state::body_to_eof:
do_complete(ec);
if(ec)
return;
break;
case parse_state::chunk_body:
len_ = 0;
state_ = parse_state::chunk_header;
break;
default:
break;
}
}
template<bool isRequest, bool isDirect, class Derived>
template<class ConstBufferSequence>
inline