mirror of
https://github.com/boostorg/beast.git
synced 2026-04-29 10:13:23 +02:00
Add buffers_range
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
// Official repository: https://github.com/boostorg/beast
|
||||
//
|
||||
|
||||
#include <boost/beast/core/buffers_range.hpp>
|
||||
#include <boost/beast/core/flat_buffer.hpp>
|
||||
#include <boost/beast/core/multi_buffer.hpp>
|
||||
#include <boost/beast/core/read_size.hpp>
|
||||
@@ -67,7 +68,7 @@ public:
|
||||
fill(MutableBufferSequence const& buffers)
|
||||
{
|
||||
std::size_t n = 0;
|
||||
for(auto b : beast::detail::buffers_range(buffers))
|
||||
for(auto b : beast::buffers_range(std::ref(buffers)))
|
||||
{
|
||||
std::fill(
|
||||
static_cast<char*>(b.data()),
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
|
||||
#include <boost/beast/http/message.hpp>
|
||||
#include <boost/beast/http/rfc7230.hpp>
|
||||
#include <boost/beast/core/buffers_range.hpp>
|
||||
#include <boost/beast/core/error.hpp>
|
||||
#include <boost/beast/core/type_traits.hpp>
|
||||
#include <boost/asio/buffer.hpp>
|
||||
@@ -268,7 +269,7 @@ nodejs_basic_parser<Derived>::write(
|
||||
ConstBufferSequence>::value,
|
||||
"ConstBufferSequence requirements not met");
|
||||
std::size_t bytes_used = 0;
|
||||
for(auto buffer : beast::detail::buffers_range(buffers))
|
||||
for(auto buffer : beast::buffers_range(std::ref(buffers)))
|
||||
{
|
||||
auto const n = write(
|
||||
static_cast<void const*>(buffer.data()),
|
||||
|
||||
Reference in New Issue
Block a user