Change BodyReader, BodyWriter requirements (API Change):

Actions Required:

* Change user defined instances of BodyReader and BodyWriter
  to meet the new requirements.
This commit is contained in:
Vinnie Falco committed 2017-07-20 08:15:29 -07:00
1 parent 2b2e99d69b
commit bf59634bc2
14 files changed
+91 -283

No files matched your search

+9 -37
View File
@@ -62,23 +62,13 @@ public:
/** Construct the reader.
@param msg The message whose body is to be retrieved.
*/
template<bool isRequest, class Body, class Headers>
explicit
BodyReader(message<isRequest, Body, Headers> const& msg);
/** Initialization.
Called once immediately after construction.
@param ec Set to the error, if any occurred.
*/
void
init(error_code& ec)
{
// The specification requires this to indicate "no error"
ec = {};
}
template<bool isRequest, class Body, class Headers>
explicit
BodyReader(message<isRequest, Body, Headers> const& msg,
error_code &ec);
/** Returns the next buffer in the body.
@@ -106,17 +96,6 @@ public:
return boost::none; // for exposition only
}
/** Called after `get` indicates there are no more buffers.
@param ec Set to the error, if any occurred.
*/
void
finish(error_code& ec)
{
// The specification requires this to indicate "no error"
ec = {};
}
};
//]
@@ -137,19 +116,12 @@ struct BodyWriter
*/
template<bool isRequest, class Body, class Fields>
explicit
BodyWriter(message<isRequest, Body, Fields>& msg);
/** Initialization.
Called once immediately before storing any buffers.
@param content_length The content length if known, else `boost::none`.
@param ec Set to the error, if any occurred.
*/
void
init(boost::optional<std::uint64_t> content_length, error_code& ec)
BodyWriter(message<isRequest, Body, Fields>& msg,
boost::optional<std::uint64_t> content_length,
error_code& ec)
{
boost::ignore_unused(msg, content_length);
// The specification requires this to indicate "no error"
ec = {};
}