forked from boostorg/beast
read_size replaces read_size_helper:
* detail::read_size_helper is removed * public function read_size helps determine the optimum size for calls to a DynamicBuffer's prepare function. * special case for Asio types which don't conform to the concept but have their own helper function.
This commit is contained in:
1 parent
fe4dfed27b
commit
a49c096042
18 files changed
+212
-147
No files matched your search
@@ -14,8 +14,8 @@
|
||||
#include <beast/http/read.hpp>
|
||||
#include <beast/core/bind_handler.hpp>
|
||||
#include <beast/core/handler_ptr.hpp>
|
||||
#include <beast/core/read_size.hpp>
|
||||
#include <beast/core/type_traits.hpp>
|
||||
#include <beast/core/detail/read_size_helper.hpp>
|
||||
#include <boost/asio/handler_alloc_hook.hpp>
|
||||
#include <boost/asio/handler_continuation_hook.hpp>
|
||||
#include <boost/asio/handler_invoke_hook.hpp>
|
||||
@@ -145,7 +145,7 @@ operator()(error_code ec, std::size_t bytes_transferred)
|
||||
try
|
||||
{
|
||||
mb_.emplace(b_.prepare(
|
||||
maybe_read_size_helper(b_, 65536)));
|
||||
read_size_or_throw(b_, 65536)));
|
||||
}
|
||||
catch(std::length_error const&)
|
||||
{
|
||||
@@ -474,8 +474,7 @@ read_some(
|
||||
try
|
||||
{
|
||||
b.emplace(buffer.prepare(
|
||||
beast::detail::maybe_read_size_helper(
|
||||
buffer, 65536)));
|
||||
read_size_or_throw(buffer, 65536)));
|
||||
}
|
||||
catch(std::length_error const&)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user