forked from boostorg/beast
finish(error_code&) is a BodyReader requirement (API Change)
This commit is contained in:
1 parent
7b24cad6c3
commit
d4ec693a61
10 files changed
+64
No files matched your search
@@ -137,6 +137,11 @@ struct buffer_body
|
||||
ec = error::need_buffer;
|
||||
return boost::none;
|
||||
}
|
||||
|
||||
void
|
||||
finish(error_code&)
|
||||
{
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
@@ -70,6 +70,11 @@ struct basic_dynamic_body
|
||||
{
|
||||
return {{body_.data(), false}};
|
||||
}
|
||||
|
||||
void
|
||||
finish(error_code&)
|
||||
{
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
@@ -72,6 +72,11 @@ struct empty_body
|
||||
{
|
||||
return boost::none;
|
||||
}
|
||||
|
||||
void
|
||||
finish(error_code&)
|
||||
{
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
@@ -250,6 +250,10 @@ get(error_code& ec, Visit&& visit)
|
||||
break;
|
||||
|
||||
go_complete:
|
||||
if(rd_)
|
||||
rd_->finish(ec);
|
||||
if(ec)
|
||||
return;
|
||||
s_ = do_complete;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -73,6 +73,11 @@ struct string_body
|
||||
return {{const_buffers_type{
|
||||
body_.data(), body_.size()}, false}};
|
||||
}
|
||||
|
||||
void
|
||||
finish(error_code&)
|
||||
{
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
@@ -83,6 +83,7 @@ struct is_body_reader<T, beast::detail::void_t<
|
||||
std::declval<boost::optional<std::pair<
|
||||
typename T::reader::const_buffers_type, bool>>&>() =
|
||||
std::declval<typename T::reader>().get(std::declval<error_code&>()),
|
||||
std::declval<typename T::reader&>().finish(std::declval<error_code&>()),
|
||||
(void)0)>> : std::integral_constant<bool,
|
||||
is_const_buffer_sequence<
|
||||
typename T::reader::const_buffers_type>::value &&
|
||||
|
||||
Reference in new issue
Block a user