forked from boostorg/beast
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:
+5
-36
@@ -49,13 +49,9 @@ public:
|
||||
|
||||
template<bool isRequest, class Allocator>
|
||||
explicit
|
||||
reader(message<isRequest, unsized_body, Allocator> const& msg)
|
||||
reader(message<isRequest, unsized_body,
|
||||
Allocator> const& msg, error_code &ec)
|
||||
: body_(msg.body)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
init(error_code& ec)
|
||||
{
|
||||
ec.assign(0, ec.category());
|
||||
}
|
||||
@@ -67,12 +63,6 @@ public:
|
||||
return {{const_buffers_type{
|
||||
body_.data(), body_.size()}, false}};
|
||||
}
|
||||
|
||||
void
|
||||
finish(error_code& ec)
|
||||
{
|
||||
ec.assign(0, ec.category());
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
@@ -104,13 +94,8 @@ public:
|
||||
template<bool isRequest, class Fields>
|
||||
explicit
|
||||
reader(message<isRequest, test_body,
|
||||
Fields> const& msg)
|
||||
Fields> const& msg, error_code& ec)
|
||||
: body_(msg.body)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
init(error_code& ec)
|
||||
{
|
||||
ec.assign(0, ec.category());
|
||||
}
|
||||
@@ -125,12 +110,6 @@ public:
|
||||
std::integral_constant<bool, isFinalEmpty>{});
|
||||
}
|
||||
|
||||
void
|
||||
finish(error_code& ec)
|
||||
{
|
||||
ec.assign(0, ec.category());
|
||||
}
|
||||
|
||||
private:
|
||||
boost::optional<std::pair<const_buffers_type, bool>>
|
||||
get(
|
||||
@@ -248,13 +227,9 @@ public:
|
||||
|
||||
template<bool isRequest, class Allocator>
|
||||
explicit
|
||||
reader(message<isRequest, fail_body, Allocator> const& msg)
|
||||
reader(message<isRequest, fail_body,
|
||||
Allocator> const& msg, error_code& ec)
|
||||
: body_(msg.body)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
init(error_code& ec)
|
||||
{
|
||||
body_.fc_.fail(ec);
|
||||
}
|
||||
@@ -269,12 +244,6 @@ public:
|
||||
return {{const_buffers_type{
|
||||
body_.s_.data() + n_++, 1}, true}};
|
||||
}
|
||||
|
||||
void
|
||||
finish(error_code& ec)
|
||||
{
|
||||
body_.fc_.fail(ec);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user