mirror of
https://github.com/boostorg/beast.git
synced 2025-08-02 06:15:24 +02:00
buffers_suffix replaces consuming_buffers (API Change):
fix #770 * consuming_buffers is renamed to buffers_suffix Actions Required: * Use buffers_suffix instead of consuming_buffers
This commit is contained in:
12
CHANGELOG.md
12
CHANGELOG.md
@@ -1,3 +1,15 @@
|
|||||||
|
Version 117:
|
||||||
|
|
||||||
|
API Changes:
|
||||||
|
|
||||||
|
* buffers_suffix replaces consuming_buffers
|
||||||
|
|
||||||
|
Actions Required:
|
||||||
|
|
||||||
|
* Use buffers_suffix instead of consuming_buffers
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
Version 116:
|
Version 116:
|
||||||
|
|
||||||
API Changes:
|
API Changes:
|
||||||
|
@@ -142,7 +142,7 @@ transferred.
|
|||||||
[link beast.ref.boost__beast__buffer_prefix.overload3 `buffer_prefix`].
|
[link beast.ref.boost__beast__buffer_prefix.overload3 `buffer_prefix`].
|
||||||
]]
|
]]
|
||||||
[[
|
[[
|
||||||
[link beast.ref.boost__beast__consuming_buffers `consuming_buffers`]
|
[link beast.ref.boost__beast__buffers_suffix `buffers_suffix`]
|
||||||
][
|
][
|
||||||
This class wraps the underlying memory of an existing buffer sequence
|
This class wraps the underlying memory of an existing buffer sequence
|
||||||
and presents a suffix of the original sequence. The length of the suffix
|
and presents a suffix of the original sequence. The length of the suffix
|
||||||
|
@@ -183,7 +183,7 @@
|
|||||||
<member><link linkend="beast.ref.boost__beast__buffer_prefix_view">buffer_prefix_view</link></member>
|
<member><link linkend="beast.ref.boost__beast__buffer_prefix_view">buffer_prefix_view</link></member>
|
||||||
<member><link linkend="beast.ref.boost__beast__buffered_read_stream">buffered_read_stream</link></member>
|
<member><link linkend="beast.ref.boost__beast__buffered_read_stream">buffered_read_stream</link></member>
|
||||||
<member><link linkend="beast.ref.boost__beast__buffers_adapter">buffers_adapter</link></member>
|
<member><link linkend="beast.ref.boost__beast__buffers_adapter">buffers_adapter</link></member>
|
||||||
<member><link linkend="beast.ref.boost__beast__consuming_buffers">consuming_buffers</link></member>
|
<member><link linkend="beast.ref.boost__beast__buffers_suffix">buffers_suffix</link></member>
|
||||||
<member><link linkend="beast.ref.boost__beast__file">file</link></member>
|
<member><link linkend="beast.ref.boost__beast__file">file</link></member>
|
||||||
<member><link linkend="beast.ref.boost__beast__file_mode">file_mode</link></member>
|
<member><link linkend="beast.ref.boost__beast__file_mode">file_mode</link></member>
|
||||||
<member><link linkend="beast.ref.boost__beast__file_posix">file_posix</link></member>
|
<member><link linkend="beast.ref.boost__beast__file_posix">file_posix</link></member>
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
#include <boost/beast/core/buffer_prefix.hpp>
|
#include <boost/beast/core/buffer_prefix.hpp>
|
||||||
#include <boost/beast/core/buffered_read_stream.hpp>
|
#include <boost/beast/core/buffered_read_stream.hpp>
|
||||||
#include <boost/beast/core/buffers_adapter.hpp>
|
#include <boost/beast/core/buffers_adapter.hpp>
|
||||||
#include <boost/beast/core/consuming_buffers.hpp>
|
#include <boost/beast/core/buffers_suffix.hpp>
|
||||||
#include <boost/beast/core/error.hpp>
|
#include <boost/beast/core/error.hpp>
|
||||||
#include <boost/beast/core/file.hpp>
|
#include <boost/beast/core/file.hpp>
|
||||||
#include <boost/beast/core/file_base.hpp>
|
#include <boost/beast/core/file_base.hpp>
|
||||||
|
@@ -7,8 +7,8 @@
|
|||||||
// Official repository: https://github.com/boostorg/beast
|
// Official repository: https://github.com/boostorg/beast
|
||||||
//
|
//
|
||||||
|
|
||||||
#ifndef BOOST_BEAST_CONSUMING_BUFFERS_HPP
|
#ifndef BOOST_BEAST_BUFFERS_SUFFIX_HPP
|
||||||
#define BOOST_BEAST_CONSUMING_BUFFERS_HPP
|
#define BOOST_BEAST_BUFFERS_SUFFIX_HPP
|
||||||
|
|
||||||
#include <boost/beast/config.hpp>
|
#include <boost/beast/config.hpp>
|
||||||
#include <boost/beast/core/detail/in_place_init.hpp>
|
#include <boost/beast/core/detail/in_place_init.hpp>
|
||||||
@@ -37,7 +37,7 @@ namespace beast {
|
|||||||
@tparam BufferSequence The buffer sequence to wrap.
|
@tparam BufferSequence The buffer sequence to wrap.
|
||||||
*/
|
*/
|
||||||
template<class BufferSequence>
|
template<class BufferSequence>
|
||||||
class consuming_buffers
|
class buffers_suffix
|
||||||
{
|
{
|
||||||
using buffers_type =
|
using buffers_type =
|
||||||
typename std::decay<BufferSequence>::type;
|
typename std::decay<BufferSequence>::type;
|
||||||
@@ -50,7 +50,7 @@ class consuming_buffers
|
|||||||
std::size_t skip_ = 0;
|
std::size_t skip_ = 0;
|
||||||
|
|
||||||
template<class Deduced>
|
template<class Deduced>
|
||||||
consuming_buffers(Deduced&& other, std::size_t dist)
|
buffers_suffix(Deduced&& other, std::size_t dist)
|
||||||
: bs_(std::forward<Deduced>(other).bs_)
|
: bs_(std::forward<Deduced>(other).bs_)
|
||||||
, begin_(std::next(bs_.begin(), dist))
|
, begin_(std::next(bs_.begin(), dist))
|
||||||
, skip_(other.skip_)
|
, skip_(other.skip_)
|
||||||
@@ -86,13 +86,13 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/// Constructor
|
/// Constructor
|
||||||
consuming_buffers();
|
buffers_suffix();
|
||||||
|
|
||||||
/// Constructor
|
/// Constructor
|
||||||
consuming_buffers(consuming_buffers&&);
|
buffers_suffix(buffers_suffix&&);
|
||||||
|
|
||||||
/// Constructor
|
/// Constructor
|
||||||
consuming_buffers(consuming_buffers const&);
|
buffers_suffix(buffers_suffix const&);
|
||||||
|
|
||||||
/** Constructor
|
/** Constructor
|
||||||
|
|
||||||
@@ -100,7 +100,7 @@ public:
|
|||||||
underlying memory is not transferred or copied.
|
underlying memory is not transferred or copied.
|
||||||
*/
|
*/
|
||||||
explicit
|
explicit
|
||||||
consuming_buffers(BufferSequence const& buffers);
|
buffers_suffix(BufferSequence const& buffers);
|
||||||
|
|
||||||
/** Constructor
|
/** Constructor
|
||||||
|
|
||||||
@@ -110,13 +110,13 @@ public:
|
|||||||
@param args Arguments forwarded to the buffers constructor.
|
@param args Arguments forwarded to the buffers constructor.
|
||||||
*/
|
*/
|
||||||
template<class... Args>
|
template<class... Args>
|
||||||
consuming_buffers(boost::in_place_init_t, Args&&... args);
|
buffers_suffix(boost::in_place_init_t, Args&&... args);
|
||||||
|
|
||||||
/// Assignment
|
/// Assignment
|
||||||
consuming_buffers& operator=(consuming_buffers&&);
|
buffers_suffix& operator=(buffers_suffix&&);
|
||||||
|
|
||||||
/// Assignment
|
/// Assignment
|
||||||
consuming_buffers& operator=(consuming_buffers const&);
|
buffers_suffix& operator=(buffers_suffix const&);
|
||||||
|
|
||||||
/// Returns the underlying buffers, without modification
|
/// Returns the underlying buffers, without modification
|
||||||
BufferSequence const&
|
BufferSequence const&
|
||||||
@@ -146,6 +146,6 @@ public:
|
|||||||
} // beast
|
} // beast
|
||||||
} // boost
|
} // boost
|
||||||
|
|
||||||
#include <boost/beast/core/impl/consuming_buffers.ipp>
|
#include <boost/beast/core/impl/buffers_suffix.ipp>
|
||||||
|
|
||||||
#endif
|
#endif
|
@@ -7,8 +7,8 @@
|
|||||||
// Official repository: https://github.com/boostorg/beast
|
// Official repository: https://github.com/boostorg/beast
|
||||||
//
|
//
|
||||||
|
|
||||||
#ifndef BOOST_BEAST_IMPL_CONSUMING_BUFFERS_IPP
|
#ifndef BOOST_BEAST_IMPL_BUFFERS_SUFFIX_IPP
|
||||||
#define BOOST_BEAST_IMPL_CONSUMING_BUFFERS_IPP
|
#define BOOST_BEAST_IMPL_BUFFERS_SUFFIX_IPP
|
||||||
|
|
||||||
#include <boost/beast/core/type_traits.hpp>
|
#include <boost/beast/core/type_traits.hpp>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
@@ -21,15 +21,15 @@ namespace boost {
|
|||||||
namespace beast {
|
namespace beast {
|
||||||
|
|
||||||
template<class Buffers>
|
template<class Buffers>
|
||||||
class consuming_buffers<Buffers>::const_iterator
|
class buffers_suffix<Buffers>::const_iterator
|
||||||
{
|
{
|
||||||
friend class consuming_buffers<Buffers>;
|
friend class buffers_suffix<Buffers>;
|
||||||
|
|
||||||
using iter_type =
|
using iter_type =
|
||||||
typename Buffers::const_iterator;
|
typename Buffers::const_iterator;
|
||||||
|
|
||||||
iter_type it_;
|
iter_type it_;
|
||||||
consuming_buffers const* b_ = nullptr;
|
buffers_suffix const* b_ = nullptr;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
using value_type = typename std::conditional<
|
using value_type = typename std::conditional<
|
||||||
@@ -104,7 +104,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const_iterator(consuming_buffers const& b,
|
const_iterator(buffers_suffix const& b,
|
||||||
iter_type it)
|
iter_type it)
|
||||||
: it_(it)
|
: it_(it)
|
||||||
, b_(&b)
|
, b_(&b)
|
||||||
@@ -115,33 +115,33 @@ private:
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
template<class Buffers>
|
template<class Buffers>
|
||||||
consuming_buffers<Buffers>::
|
buffers_suffix<Buffers>::
|
||||||
consuming_buffers()
|
buffers_suffix()
|
||||||
: begin_(bs_.begin())
|
: begin_(bs_.begin())
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class Buffers>
|
template<class Buffers>
|
||||||
consuming_buffers<Buffers>::
|
buffers_suffix<Buffers>::
|
||||||
consuming_buffers(consuming_buffers&& other)
|
buffers_suffix(buffers_suffix&& other)
|
||||||
: consuming_buffers(std::move(other),
|
: buffers_suffix(std::move(other),
|
||||||
std::distance<iter_type>(
|
std::distance<iter_type>(
|
||||||
other.bs_.begin(), other.begin_))
|
other.bs_.begin(), other.begin_))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class Buffers>
|
template<class Buffers>
|
||||||
consuming_buffers<Buffers>::
|
buffers_suffix<Buffers>::
|
||||||
consuming_buffers(consuming_buffers const& other)
|
buffers_suffix(buffers_suffix const& other)
|
||||||
: consuming_buffers(other,
|
: buffers_suffix(other,
|
||||||
std::distance<iter_type>(
|
std::distance<iter_type>(
|
||||||
other.bs_.begin(), other.begin_))
|
other.bs_.begin(), other.begin_))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class Buffers>
|
template<class Buffers>
|
||||||
consuming_buffers<Buffers>::
|
buffers_suffix<Buffers>::
|
||||||
consuming_buffers(Buffers const& bs)
|
buffers_suffix(Buffers const& bs)
|
||||||
: bs_(bs)
|
: bs_(bs)
|
||||||
, begin_(bs_.begin())
|
, begin_(bs_.begin())
|
||||||
{
|
{
|
||||||
@@ -153,8 +153,8 @@ consuming_buffers(Buffers const& bs)
|
|||||||
|
|
||||||
template<class Buffers>
|
template<class Buffers>
|
||||||
template<class... Args>
|
template<class... Args>
|
||||||
consuming_buffers<Buffers>::
|
buffers_suffix<Buffers>::
|
||||||
consuming_buffers(boost::in_place_init_t, Args&&... args)
|
buffers_suffix(boost::in_place_init_t, Args&&... args)
|
||||||
: bs_(std::forward<Args>(args)...)
|
: bs_(std::forward<Args>(args)...)
|
||||||
, begin_(bs_.begin())
|
, begin_(bs_.begin())
|
||||||
{
|
{
|
||||||
@@ -167,9 +167,9 @@ consuming_buffers(boost::in_place_init_t, Args&&... args)
|
|||||||
|
|
||||||
template<class Buffers>
|
template<class Buffers>
|
||||||
auto
|
auto
|
||||||
consuming_buffers<Buffers>::
|
buffers_suffix<Buffers>::
|
||||||
operator=(consuming_buffers&& other) ->
|
operator=(buffers_suffix&& other) ->
|
||||||
consuming_buffers&
|
buffers_suffix&
|
||||||
{
|
{
|
||||||
auto const dist = std::distance<iter_type>(
|
auto const dist = std::distance<iter_type>(
|
||||||
other.bs_.begin(), other.begin_);
|
other.bs_.begin(), other.begin_);
|
||||||
@@ -181,9 +181,9 @@ operator=(consuming_buffers&& other) ->
|
|||||||
|
|
||||||
template<class Buffers>
|
template<class Buffers>
|
||||||
auto
|
auto
|
||||||
consuming_buffers<Buffers>::
|
buffers_suffix<Buffers>::
|
||||||
operator=(consuming_buffers const& other) ->
|
operator=(buffers_suffix const& other) ->
|
||||||
consuming_buffers&
|
buffers_suffix&
|
||||||
{
|
{
|
||||||
auto const dist = std::distance<iter_type>(
|
auto const dist = std::distance<iter_type>(
|
||||||
other.bs_.begin(), other.begin_);
|
other.bs_.begin(), other.begin_);
|
||||||
@@ -196,7 +196,7 @@ operator=(consuming_buffers const& other) ->
|
|||||||
template<class Buffers>
|
template<class Buffers>
|
||||||
inline
|
inline
|
||||||
auto
|
auto
|
||||||
consuming_buffers<Buffers>::
|
buffers_suffix<Buffers>::
|
||||||
begin() const ->
|
begin() const ->
|
||||||
const_iterator
|
const_iterator
|
||||||
{
|
{
|
||||||
@@ -206,7 +206,7 @@ begin() const ->
|
|||||||
template<class Buffers>
|
template<class Buffers>
|
||||||
inline
|
inline
|
||||||
auto
|
auto
|
||||||
consuming_buffers<Buffers>::
|
buffers_suffix<Buffers>::
|
||||||
end() const ->
|
end() const ->
|
||||||
const_iterator
|
const_iterator
|
||||||
{
|
{
|
||||||
@@ -215,7 +215,7 @@ end() const ->
|
|||||||
|
|
||||||
template<class Buffers>
|
template<class Buffers>
|
||||||
void
|
void
|
||||||
consuming_buffers<Buffers>::
|
buffers_suffix<Buffers>::
|
||||||
consume(std::size_t amount)
|
consume(std::size_t amount)
|
||||||
{
|
{
|
||||||
using boost::asio::buffer_size;
|
using boost::asio::buffer_size;
|
@@ -13,7 +13,7 @@
|
|||||||
#include <boost/beast/config.hpp>
|
#include <boost/beast/config.hpp>
|
||||||
#include <boost/beast/core/buffer_cat.hpp>
|
#include <boost/beast/core/buffer_cat.hpp>
|
||||||
#include <boost/beast/core/buffer_prefix.hpp>
|
#include <boost/beast/core/buffer_prefix.hpp>
|
||||||
#include <boost/beast/core/consuming_buffers.hpp>
|
#include <boost/beast/core/buffers_suffix.hpp>
|
||||||
#include <boost/beast/core/string.hpp>
|
#include <boost/beast/core/string.hpp>
|
||||||
#include <boost/beast/core/type_traits.hpp>
|
#include <boost/beast/core/type_traits.hpp>
|
||||||
#include <boost/beast/core/detail/variant.hpp>
|
#include <boost/beast/core/detail/variant.hpp>
|
||||||
@@ -116,20 +116,20 @@ private:
|
|||||||
|
|
||||||
using reader = typename Body::reader;
|
using reader = typename Body::reader;
|
||||||
|
|
||||||
using cb1_t = consuming_buffers<typename
|
using cb1_t = buffers_suffix<typename
|
||||||
Fields::reader::const_buffers_type>; // header
|
Fields::reader::const_buffers_type>; // header
|
||||||
using pcb1_t = buffer_prefix_view<cb1_t const&>;
|
using pcb1_t = buffer_prefix_view<cb1_t const&>;
|
||||||
|
|
||||||
using cb2_t = consuming_buffers<buffer_cat_view<
|
using cb2_t = buffers_suffix<buffer_cat_view<
|
||||||
typename Fields::reader::const_buffers_type,// header
|
typename Fields::reader::const_buffers_type,// header
|
||||||
typename reader::const_buffers_type>>; // body
|
typename reader::const_buffers_type>>; // body
|
||||||
using pcb2_t = buffer_prefix_view<cb2_t const&>;
|
using pcb2_t = buffer_prefix_view<cb2_t const&>;
|
||||||
|
|
||||||
using cb3_t = consuming_buffers<
|
using cb3_t = buffers_suffix<
|
||||||
typename reader::const_buffers_type>; // body
|
typename reader::const_buffers_type>; // body
|
||||||
using pcb3_t = buffer_prefix_view<cb3_t const&>;
|
using pcb3_t = buffer_prefix_view<cb3_t const&>;
|
||||||
|
|
||||||
using cb4_t = consuming_buffers<buffer_cat_view<
|
using cb4_t = buffers_suffix<buffer_cat_view<
|
||||||
typename Fields::reader::const_buffers_type,// header
|
typename Fields::reader::const_buffers_type,// header
|
||||||
detail::chunk_size, // chunk-size
|
detail::chunk_size, // chunk-size
|
||||||
boost::asio::const_buffers_1, // chunk-ext
|
boost::asio::const_buffers_1, // chunk-ext
|
||||||
@@ -138,7 +138,7 @@ private:
|
|||||||
chunk_crlf>>; // crlf
|
chunk_crlf>>; // crlf
|
||||||
using pcb4_t = buffer_prefix_view<cb4_t const&>;
|
using pcb4_t = buffer_prefix_view<cb4_t const&>;
|
||||||
|
|
||||||
using cb5_t = consuming_buffers<buffer_cat_view<
|
using cb5_t = buffers_suffix<buffer_cat_view<
|
||||||
detail::chunk_size, // chunk-header
|
detail::chunk_size, // chunk-header
|
||||||
boost::asio::const_buffers_1, // chunk-ext
|
boost::asio::const_buffers_1, // chunk-ext
|
||||||
chunk_crlf, // crlf
|
chunk_crlf, // crlf
|
||||||
@@ -146,7 +146,7 @@ private:
|
|||||||
chunk_crlf>>; // crlf
|
chunk_crlf>>; // crlf
|
||||||
using pcb5_t = buffer_prefix_view<cb5_t const&>;
|
using pcb5_t = buffer_prefix_view<cb5_t const&>;
|
||||||
|
|
||||||
using cb6_t = consuming_buffers<buffer_cat_view<
|
using cb6_t = buffers_suffix<buffer_cat_view<
|
||||||
detail::chunk_size, // chunk-header
|
detail::chunk_size, // chunk-header
|
||||||
boost::asio::const_buffers_1, // chunk-size
|
boost::asio::const_buffers_1, // chunk-size
|
||||||
chunk_crlf, // crlf
|
chunk_crlf, // crlf
|
||||||
@@ -157,7 +157,7 @@ private:
|
|||||||
chunk_crlf>>; // crlf
|
chunk_crlf>>; // crlf
|
||||||
using pcb6_t = buffer_prefix_view<cb6_t const&>;
|
using pcb6_t = buffer_prefix_view<cb6_t const&>;
|
||||||
|
|
||||||
using cb7_t = consuming_buffers<buffer_cat_view<
|
using cb7_t = buffers_suffix<buffer_cat_view<
|
||||||
typename Fields::reader::const_buffers_type,// header
|
typename Fields::reader::const_buffers_type,// header
|
||||||
detail::chunk_size, // chunk-size
|
detail::chunk_size, // chunk-size
|
||||||
boost::asio::const_buffers_1, // chunk-ext
|
boost::asio::const_buffers_1, // chunk-ext
|
||||||
@@ -169,7 +169,7 @@ private:
|
|||||||
chunk_crlf>>; // crlf
|
chunk_crlf>>; // crlf
|
||||||
using pcb7_t = buffer_prefix_view<cb7_t const&>;
|
using pcb7_t = buffer_prefix_view<cb7_t const&>;
|
||||||
|
|
||||||
using cb8_t = consuming_buffers<buffer_cat_view<
|
using cb8_t = buffers_suffix<buffer_cat_view<
|
||||||
boost::asio::const_buffers_1, // chunk-final
|
boost::asio::const_buffers_1, // chunk-final
|
||||||
boost::asio::const_buffers_1, // trailers
|
boost::asio::const_buffers_1, // trailers
|
||||||
chunk_crlf>>; // crlf
|
chunk_crlf>>; // crlf
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
#include <boost/beast/config.hpp>
|
#include <boost/beast/config.hpp>
|
||||||
#include <boost/beast/core/buffer_cat.hpp>
|
#include <boost/beast/core/buffer_cat.hpp>
|
||||||
#include <boost/beast/core/consuming_buffers.hpp>
|
#include <boost/beast/core/buffers_suffix.hpp>
|
||||||
#include <boost/beast/core/multi_buffer.hpp>
|
#include <boost/beast/core/multi_buffer.hpp>
|
||||||
#include <boost/beast/http/message.hpp>
|
#include <boost/beast/http/message.hpp>
|
||||||
#include <boost/beast/http/serializer.hpp>
|
#include <boost/beast/http/serializer.hpp>
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
#include <boost/beast/websocket/rfc6455.hpp>
|
#include <boost/beast/websocket/rfc6455.hpp>
|
||||||
#include <boost/beast/websocket/detail/utf8_checker.hpp>
|
#include <boost/beast/websocket/detail/utf8_checker.hpp>
|
||||||
#include <boost/beast/core/consuming_buffers.hpp>
|
#include <boost/beast/core/buffers_suffix.hpp>
|
||||||
#include <boost/beast/core/flat_static_buffer.hpp>
|
#include <boost/beast/core/flat_static_buffer.hpp>
|
||||||
#include <boost/beast/core/static_string.hpp>
|
#include <boost/beast/core/static_string.hpp>
|
||||||
#include <boost/asio/buffer.hpp>
|
#include <boost/asio/buffer.hpp>
|
||||||
@@ -265,7 +265,7 @@ read_close(close_reason& cr,
|
|||||||
code = close_code::protocol_error;
|
code = close_code::protocol_error;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
consuming_buffers<Buffers> cb(bs);
|
buffers_suffix<Buffers> cb(bs);
|
||||||
{
|
{
|
||||||
std::uint8_t b[2];
|
std::uint8_t b[2];
|
||||||
buffer_copy(buffer(b), cb);
|
buffer_copy(buffer(b), cb);
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
#define BOOST_BEAST_WEBSOCKET_DETAIL_PMD_EXTENSION_HPP
|
#define BOOST_BEAST_WEBSOCKET_DETAIL_PMD_EXTENSION_HPP
|
||||||
|
|
||||||
#include <boost/beast/core/error.hpp>
|
#include <boost/beast/core/error.hpp>
|
||||||
#include <boost/beast/core/consuming_buffers.hpp>
|
#include <boost/beast/core/buffers_suffix.hpp>
|
||||||
#include <boost/beast/core/read_size.hpp>
|
#include <boost/beast/core/read_size.hpp>
|
||||||
#include <boost/beast/zlib/deflate_stream.hpp>
|
#include <boost/beast/zlib/deflate_stream.hpp>
|
||||||
#include <boost/beast/zlib/inflate_stream.hpp>
|
#include <boost/beast/zlib/inflate_stream.hpp>
|
||||||
@@ -365,7 +365,7 @@ bool
|
|||||||
deflate(
|
deflate(
|
||||||
DeflateStream& zo,
|
DeflateStream& zo,
|
||||||
boost::asio::mutable_buffer& out,
|
boost::asio::mutable_buffer& out,
|
||||||
consuming_buffers<ConstBufferSequence>& cb,
|
buffers_suffix<ConstBufferSequence>& cb,
|
||||||
bool fin,
|
bool fin,
|
||||||
std::size_t& total_in,
|
std::size_t& total_in,
|
||||||
error_code& ec)
|
error_code& ec)
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
#include <boost/beast/websocket/teardown.hpp>
|
#include <boost/beast/websocket/teardown.hpp>
|
||||||
#include <boost/beast/core/bind_handler.hpp>
|
#include <boost/beast/core/bind_handler.hpp>
|
||||||
#include <boost/beast/core/buffer_prefix.hpp>
|
#include <boost/beast/core/buffer_prefix.hpp>
|
||||||
#include <boost/beast/core/consuming_buffers.hpp>
|
#include <boost/beast/core/buffers_suffix.hpp>
|
||||||
#include <boost/beast/core/flat_static_buffer.hpp>
|
#include <boost/beast/core/flat_static_buffer.hpp>
|
||||||
#include <boost/beast/core/type_traits.hpp>
|
#include <boost/beast/core/type_traits.hpp>
|
||||||
#include <boost/beast/core/detail/clamp.hpp>
|
#include <boost/beast/core/detail/clamp.hpp>
|
||||||
@@ -47,7 +47,7 @@ class stream<NextLayer>::read_some_op
|
|||||||
{
|
{
|
||||||
Handler h_;
|
Handler h_;
|
||||||
stream<NextLayer>& ws_;
|
stream<NextLayer>& ws_;
|
||||||
consuming_buffers<MutableBufferSequence> cb_;
|
buffers_suffix<MutableBufferSequence> cb_;
|
||||||
std::size_t bytes_written_ = 0;
|
std::size_t bytes_written_ = 0;
|
||||||
error_code ev_;
|
error_code ev_;
|
||||||
token tok_;
|
token tok_;
|
||||||
@@ -1178,7 +1178,7 @@ loop:
|
|||||||
// never emit the end-of-stream deflate block.
|
// never emit the end-of-stream deflate block.
|
||||||
//
|
//
|
||||||
bool did_read = false;
|
bool did_read = false;
|
||||||
consuming_buffers<MutableBufferSequence> cb{buffers};
|
buffers_suffix<MutableBufferSequence> cb{buffers};
|
||||||
while(buffer_size(cb) > 0)
|
while(buffer_size(cb) > 0)
|
||||||
{
|
{
|
||||||
zlib::z_params zs;
|
zlib::z_params zs;
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
#include <boost/beast/http/rfc7230.hpp>
|
#include <boost/beast/http/rfc7230.hpp>
|
||||||
#include <boost/beast/core/buffer_cat.hpp>
|
#include <boost/beast/core/buffer_cat.hpp>
|
||||||
#include <boost/beast/core/buffer_prefix.hpp>
|
#include <boost/beast/core/buffer_prefix.hpp>
|
||||||
#include <boost/beast/core/consuming_buffers.hpp>
|
#include <boost/beast/core/buffers_suffix.hpp>
|
||||||
#include <boost/beast/core/flat_static_buffer.hpp>
|
#include <boost/beast/core/flat_static_buffer.hpp>
|
||||||
#include <boost/beast/core/type_traits.hpp>
|
#include <boost/beast/core/type_traits.hpp>
|
||||||
#include <boost/beast/core/detail/clamp.hpp>
|
#include <boost/beast/core/detail/clamp.hpp>
|
||||||
@@ -261,7 +261,7 @@ parse_fh(
|
|||||||
code = close_code::none;
|
code = close_code::none;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
consuming_buffers<typename
|
buffers_suffix<typename
|
||||||
DynamicBuffer::const_buffers_type> cb{
|
DynamicBuffer::const_buffers_type> cb{
|
||||||
b.data()};
|
b.data()};
|
||||||
std::size_t need;
|
std::size_t need;
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
#include <boost/beast/core/bind_handler.hpp>
|
#include <boost/beast/core/bind_handler.hpp>
|
||||||
#include <boost/beast/core/buffer_cat.hpp>
|
#include <boost/beast/core/buffer_cat.hpp>
|
||||||
#include <boost/beast/core/buffer_prefix.hpp>
|
#include <boost/beast/core/buffer_prefix.hpp>
|
||||||
#include <boost/beast/core/consuming_buffers.hpp>
|
#include <boost/beast/core/buffers_suffix.hpp>
|
||||||
#include <boost/beast/core/handler_ptr.hpp>
|
#include <boost/beast/core/handler_ptr.hpp>
|
||||||
#include <boost/beast/core/flat_static_buffer.hpp>
|
#include <boost/beast/core/flat_static_buffer.hpp>
|
||||||
#include <boost/beast/core/type_traits.hpp>
|
#include <boost/beast/core/type_traits.hpp>
|
||||||
@@ -41,7 +41,7 @@ class stream<NextLayer>::write_some_op
|
|||||||
{
|
{
|
||||||
Handler h_;
|
Handler h_;
|
||||||
stream<NextLayer>& ws_;
|
stream<NextLayer>& ws_;
|
||||||
consuming_buffers<Buffers> cb_;
|
buffers_suffix<Buffers> cb_;
|
||||||
detail::frame_header fh_;
|
detail::frame_header fh_;
|
||||||
detail::prepared_key key_;
|
detail::prepared_key key_;
|
||||||
std::size_t bytes_transferred_ = 0;
|
std::size_t bytes_transferred_ = 0;
|
||||||
@@ -544,7 +544,7 @@ write_some(bool fin,
|
|||||||
auto remain = buffer_size(buffers);
|
auto remain = buffer_size(buffers);
|
||||||
if(wr_compress_)
|
if(wr_compress_)
|
||||||
{
|
{
|
||||||
consuming_buffers<
|
buffers_suffix<
|
||||||
ConstBufferSequence> cb{buffers};
|
ConstBufferSequence> cb{buffers};
|
||||||
for(;;)
|
for(;;)
|
||||||
{
|
{
|
||||||
@@ -616,7 +616,7 @@ write_some(bool fin,
|
|||||||
{
|
{
|
||||||
// no mask, autofrag
|
// no mask, autofrag
|
||||||
BOOST_ASSERT(wr_buf_size_ != 0);
|
BOOST_ASSERT(wr_buf_size_ != 0);
|
||||||
consuming_buffers<
|
buffers_suffix<
|
||||||
ConstBufferSequence> cb{buffers};
|
ConstBufferSequence> cb{buffers};
|
||||||
for(;;)
|
for(;;)
|
||||||
{
|
{
|
||||||
@@ -652,7 +652,7 @@ write_some(bool fin,
|
|||||||
detail::fh_buffer fh_buf;
|
detail::fh_buffer fh_buf;
|
||||||
detail::write<
|
detail::write<
|
||||||
flat_static_buffer_base>(fh_buf, fh);
|
flat_static_buffer_base>(fh_buf, fh);
|
||||||
consuming_buffers<
|
buffers_suffix<
|
||||||
ConstBufferSequence> cb{buffers};
|
ConstBufferSequence> cb{buffers};
|
||||||
{
|
{
|
||||||
auto const n = clamp(remain, wr_buf_size_);
|
auto const n = clamp(remain, wr_buf_size_);
|
||||||
@@ -686,7 +686,7 @@ write_some(bool fin,
|
|||||||
{
|
{
|
||||||
// mask, autofrag
|
// mask, autofrag
|
||||||
BOOST_ASSERT(wr_buf_size_ != 0);
|
BOOST_ASSERT(wr_buf_size_ != 0);
|
||||||
consuming_buffers<
|
buffers_suffix<
|
||||||
ConstBufferSequence> cb{buffers};
|
ConstBufferSequence> cb{buffers};
|
||||||
for(;;)
|
for(;;)
|
||||||
{
|
{
|
||||||
|
@@ -24,8 +24,7 @@ add_executable (tests-beast-core
|
|||||||
buffer_prefix.cpp
|
buffer_prefix.cpp
|
||||||
buffered_read_stream.cpp
|
buffered_read_stream.cpp
|
||||||
buffers_adapter.cpp
|
buffers_adapter.cpp
|
||||||
clamp.cpp
|
buffers_suffix.cpp
|
||||||
consuming_buffers.cpp
|
|
||||||
error.cpp
|
error.cpp
|
||||||
file.cpp
|
file.cpp
|
||||||
file_posix.cpp
|
file_posix.cpp
|
||||||
@@ -44,9 +43,10 @@ add_executable (tests-beast-core
|
|||||||
static_buffer.cpp
|
static_buffer.cpp
|
||||||
string_param.cpp
|
string_param.cpp
|
||||||
type_traits.cpp
|
type_traits.cpp
|
||||||
base64.cpp
|
detail/base64.cpp
|
||||||
empty_base_optimization.cpp
|
detail/clamp.cpp
|
||||||
sha1.cpp
|
detail/empty_base_optimization.cpp
|
||||||
|
detail/sha1.cpp
|
||||||
detail/variant.cpp
|
detail/variant.cpp
|
||||||
detail/varint.cpp
|
detail/varint.cpp
|
||||||
)
|
)
|
||||||
|
@@ -14,8 +14,7 @@ local SOURCES =
|
|||||||
buffer_prefix.cpp
|
buffer_prefix.cpp
|
||||||
buffered_read_stream.cpp
|
buffered_read_stream.cpp
|
||||||
buffers_adapter.cpp
|
buffers_adapter.cpp
|
||||||
clamp.cpp
|
buffers_suffix.cpp
|
||||||
consuming_buffers.cpp
|
|
||||||
error.cpp
|
error.cpp
|
||||||
file.cpp
|
file.cpp
|
||||||
file_posix.cpp
|
file_posix.cpp
|
||||||
@@ -34,9 +33,10 @@ local SOURCES =
|
|||||||
string.cpp
|
string.cpp
|
||||||
string_param.cpp
|
string_param.cpp
|
||||||
type_traits.cpp
|
type_traits.cpp
|
||||||
base64.cpp
|
detail/base64.cpp
|
||||||
empty_base_optimization.cpp
|
detail/clamp.cpp
|
||||||
sha1.cpp
|
detail/empty_base_optimization.cpp
|
||||||
|
detail/sha1.cpp
|
||||||
detail/variant.cpp
|
detail/variant.cpp
|
||||||
detail/varint.cpp
|
detail/varint.cpp
|
||||||
;
|
;
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
// Test that header file is self-contained.
|
// Test that header file is self-contained.
|
||||||
#include <boost/beast/core/buffer_prefix.hpp>
|
#include <boost/beast/core/buffer_prefix.hpp>
|
||||||
|
|
||||||
#include <boost/beast/core/consuming_buffers.hpp>
|
#include <boost/beast/core/buffers_suffix.hpp>
|
||||||
#include <boost/beast/core/type_traits.hpp>
|
#include <boost/beast/core/type_traits.hpp>
|
||||||
#include <boost/beast/unit_test/suite.hpp>
|
#include <boost/beast/unit_test/suite.hpp>
|
||||||
#include <boost/asio/buffer.hpp>
|
#include <boost/asio/buffer.hpp>
|
||||||
@@ -149,7 +149,7 @@ public:
|
|||||||
BEAST_EXPECT(buffer_copy(pb0, pb1) == 0);
|
BEAST_EXPECT(buffer_copy(pb0, pb1) == 0);
|
||||||
|
|
||||||
using pb_type = decltype(pb0);
|
using pb_type = decltype(pb0);
|
||||||
consuming_buffers<pb_type> cb(pb0);
|
buffers_suffix<pb_type> cb(pb0);
|
||||||
BEAST_EXPECT(buffer_size(cb) == 0);
|
BEAST_EXPECT(buffer_size(cb) == 0);
|
||||||
BEAST_EXPECT(buffer_copy(cb, pb1) == 0);
|
BEAST_EXPECT(buffer_copy(cb, pb1) == 0);
|
||||||
cb.consume(1);
|
cb.consume(1);
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
// Test that header file is self-contained.
|
// Test that header file is self-contained.
|
||||||
#include <boost/beast/core/consuming_buffers.hpp>
|
#include <boost/beast/core/buffers_suffix.hpp>
|
||||||
|
|
||||||
#include "buffer_test.hpp"
|
#include "buffer_test.hpp"
|
||||||
|
|
||||||
@@ -21,15 +21,15 @@
|
|||||||
namespace boost {
|
namespace boost {
|
||||||
namespace beast {
|
namespace beast {
|
||||||
|
|
||||||
class consuming_buffers_test : public beast::unit_test::suite
|
class buffers_suffix_test : public beast::unit_test::suite
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
template<class BufferSequence>
|
template<class BufferSequence>
|
||||||
static
|
static
|
||||||
consuming_buffers<BufferSequence>
|
buffers_suffix<BufferSequence>
|
||||||
consumed_buffers(BufferSequence const& bs, std::size_t n)
|
consumed_buffers(BufferSequence const& bs, std::size_t n)
|
||||||
{
|
{
|
||||||
consuming_buffers<BufferSequence> cb(bs);
|
buffers_suffix<BufferSequence> cb(bs);
|
||||||
cb.consume(n);
|
cb.consume(n);
|
||||||
return cb;
|
return cb;
|
||||||
}
|
}
|
||||||
@@ -57,10 +57,10 @@ public:
|
|||||||
testMembers()
|
testMembers()
|
||||||
{
|
{
|
||||||
char buf[12];
|
char buf[12];
|
||||||
consuming_buffers<
|
buffers_suffix<
|
||||||
boost::asio::const_buffers_1> cb1{
|
boost::asio::const_buffers_1> cb1{
|
||||||
boost::in_place_init, buf, sizeof(buf)};
|
boost::in_place_init, buf, sizeof(buf)};
|
||||||
consuming_buffers<
|
buffers_suffix<
|
||||||
boost::asio::const_buffers_1> cb2{
|
boost::asio::const_buffers_1> cb2{
|
||||||
boost::in_place_init, nullptr, 0};
|
boost::in_place_init, nullptr, 0};
|
||||||
cb2 = cb1;
|
cb2 = cb1;
|
||||||
@@ -89,7 +89,7 @@ public:
|
|||||||
const_buffer{&buf[0], i},
|
const_buffer{&buf[0], i},
|
||||||
const_buffer{&buf[i], j},
|
const_buffer{&buf[i], j},
|
||||||
const_buffer{&buf[i+j], k}}};
|
const_buffer{&buf[i+j], k}}};
|
||||||
consuming_buffers<decltype(bs)> cb(bs);
|
buffers_suffix<decltype(bs)> cb(bs);
|
||||||
BEAST_EXPECT(to_string(cb) == s);
|
BEAST_EXPECT(to_string(cb) == s);
|
||||||
expect_size(s.size(), cb);
|
expect_size(s.size(), cb);
|
||||||
cb.consume(0);
|
cb.consume(0);
|
||||||
@@ -125,7 +125,7 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
consuming_buffers<test_buffer> cb;
|
buffers_suffix<test_buffer> cb;
|
||||||
BEAST_EXPECT(to_string(cb) == "\r\n");
|
BEAST_EXPECT(to_string(cb) == "\r\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -133,7 +133,7 @@ public:
|
|||||||
testInPlace()
|
testInPlace()
|
||||||
{
|
{
|
||||||
using namespace test;
|
using namespace test;
|
||||||
consuming_buffers<buffer_cat_view<
|
buffers_suffix<buffer_cat_view<
|
||||||
boost::asio::const_buffers_1,
|
boost::asio::const_buffers_1,
|
||||||
boost::asio::const_buffers_1>> cb(
|
boost::asio::const_buffers_1>> cb(
|
||||||
boost::in_place_init,
|
boost::in_place_init,
|
||||||
@@ -148,10 +148,10 @@ public:
|
|||||||
using boost::asio::buffer_copy;
|
using boost::asio::buffer_copy;
|
||||||
using boost::asio::buffer_size;
|
using boost::asio::buffer_size;
|
||||||
using boost::asio::null_buffers;
|
using boost::asio::null_buffers;
|
||||||
consuming_buffers<null_buffers> cb(
|
buffers_suffix<null_buffers> cb(
|
||||||
null_buffers{});
|
null_buffers{});
|
||||||
BEAST_EXPECT(buffer_size(cb) == 0);
|
BEAST_EXPECT(buffer_size(cb) == 0);
|
||||||
consuming_buffers<null_buffers> cb2(
|
buffers_suffix<null_buffers> cb2(
|
||||||
null_buffers{});
|
null_buffers{});
|
||||||
BEAST_EXPECT(buffer_copy(cb2, cb) == 0);
|
BEAST_EXPECT(buffer_copy(cb2, cb) == 0);
|
||||||
}
|
}
|
||||||
@@ -161,7 +161,7 @@ public:
|
|||||||
{
|
{
|
||||||
using boost::asio::const_buffer;
|
using boost::asio::const_buffer;
|
||||||
std::array<const_buffer, 3> ba;
|
std::array<const_buffer, 3> ba;
|
||||||
consuming_buffers<decltype(ba)> cb(ba);
|
buffers_suffix<decltype(ba)> cb(ba);
|
||||||
std::size_t n = 0;
|
std::size_t n = 0;
|
||||||
for(auto it = cb.end(); it != cb.begin(); --it)
|
for(auto it = cb.end(); it != cb.begin(); --it)
|
||||||
++n;
|
++n;
|
||||||
@@ -179,7 +179,7 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
BEAST_DEFINE_TESTSUITE(beast,core,consuming_buffers);
|
BEAST_DEFINE_TESTSUITE(beast,core,buffers_suffix);
|
||||||
|
|
||||||
} // beast
|
} // beast
|
||||||
} // boost
|
} // boost
|
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
#include <boost/beast/core/buffer_cat.hpp>
|
#include <boost/beast/core/buffer_cat.hpp>
|
||||||
#include <boost/beast/core/buffer_prefix.hpp>
|
#include <boost/beast/core/buffer_prefix.hpp>
|
||||||
#include <boost/beast/core/consuming_buffers.hpp>
|
#include <boost/beast/core/buffers_suffix.hpp>
|
||||||
#include <boost/beast/core/multi_buffer.hpp>
|
#include <boost/beast/core/multi_buffer.hpp>
|
||||||
#include <boost/beast/core/ostream.hpp>
|
#include <boost/beast/core/ostream.hpp>
|
||||||
#include <boost/beast/http/parser.hpp>
|
#include <boost/beast/http/parser.hpp>
|
||||||
@@ -163,7 +163,7 @@ public:
|
|||||||
p.eager(true);
|
p.eager(true);
|
||||||
p.skip(skip);
|
p.skip(skip);
|
||||||
error_code ec;
|
error_code ec;
|
||||||
consuming_buffers<ConstBufferSequence> cb{buffers};
|
buffers_suffix<ConstBufferSequence> cb{buffers};
|
||||||
auto n = p.put(buffer_prefix(i, cb), ec);
|
auto n = p.put(buffer_prefix(i, cb), ec);
|
||||||
if(! BEAST_EXPECTS(! ec ||
|
if(! BEAST_EXPECTS(! ec ||
|
||||||
ec == error::need_more, ec.message()))
|
ec == error::need_more, ec.message()))
|
||||||
@@ -191,7 +191,7 @@ public:
|
|||||||
Parser p;
|
Parser p;
|
||||||
p.eager(true);
|
p.eager(true);
|
||||||
error_code ec;
|
error_code ec;
|
||||||
consuming_buffers<ConstBufferSequence> cb{buffers};
|
buffers_suffix<ConstBufferSequence> cb{buffers};
|
||||||
cb.consume(i);
|
cb.consume(i);
|
||||||
auto n = p.put(buffer_cat(
|
auto n = p.put(buffer_cat(
|
||||||
buffer_prefix(i, buffers), cb), ec);
|
buffer_prefix(i, buffers), cb), ec);
|
||||||
@@ -241,7 +241,7 @@ public:
|
|||||||
Parser p;
|
Parser p;
|
||||||
p.eager(true);
|
p.eager(true);
|
||||||
error_code ec;
|
error_code ec;
|
||||||
consuming_buffers<boost::asio::const_buffers_1> cb{
|
buffers_suffix<boost::asio::const_buffers_1> cb{
|
||||||
boost::in_place_init, msg.data(), msg.size()};
|
boost::in_place_init, msg.data(), msg.size()};
|
||||||
auto n = p.put(buffer_prefix(i, cb), ec);
|
auto n = p.put(buffer_prefix(i, cb), ec);
|
||||||
if(ec == result)
|
if(ec == result)
|
||||||
|
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
#include <boost/beast/unit_test/suite.hpp>
|
#include <boost/beast/unit_test/suite.hpp>
|
||||||
#include <boost/beast/test/yield_to.hpp>
|
#include <boost/beast/test/yield_to.hpp>
|
||||||
#include <boost/beast/core/consuming_buffers.hpp>
|
#include <boost/beast/core/buffers_suffix.hpp>
|
||||||
#include <boost/beast/core/flat_buffer.hpp>
|
#include <boost/beast/core/flat_buffer.hpp>
|
||||||
#include <boost/beast/core/multi_buffer.hpp>
|
#include <boost/beast/core/multi_buffer.hpp>
|
||||||
#include <boost/beast/core/ostream.hpp>
|
#include <boost/beast/core/ostream.hpp>
|
||||||
@@ -51,7 +51,7 @@ public:
|
|||||||
error_code& ec)
|
error_code& ec)
|
||||||
{
|
{
|
||||||
using boost::asio::buffer_size;
|
using boost::asio::buffer_size;
|
||||||
consuming_buffers<ConstBufferSequence> cb{buffers};
|
buffers_suffix<ConstBufferSequence> cb{buffers};
|
||||||
for(;;)
|
for(;;)
|
||||||
{
|
{
|
||||||
auto const used = p.put(cb, ec);
|
auto const used = p.put(cb, ec);
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
// Test that header file is self-contained.
|
// Test that header file is self-contained.
|
||||||
#include <boost/beast/websocket/detail/utf8_checker.hpp>
|
#include <boost/beast/websocket/detail/utf8_checker.hpp>
|
||||||
|
|
||||||
#include <boost/beast/core/consuming_buffers.hpp>
|
#include <boost/beast/core/buffers_suffix.hpp>
|
||||||
#include <boost/beast/core/multi_buffer.hpp>
|
#include <boost/beast/core/multi_buffer.hpp>
|
||||||
#include <boost/beast/unit_test/suite.hpp>
|
#include <boost/beast/unit_test/suite.hpp>
|
||||||
#include <array>
|
#include <array>
|
||||||
@@ -394,7 +394,7 @@ public:
|
|||||||
{
|
{
|
||||||
static std::size_t constexpr size = 3;
|
static std::size_t constexpr size = 3;
|
||||||
std::size_t n = s.size();
|
std::size_t n = s.size();
|
||||||
consuming_buffers<
|
buffers_suffix<
|
||||||
boost::asio::const_buffers_1> cb{
|
boost::asio::const_buffers_1> cb{
|
||||||
boost::asio::const_buffers_1(s.data(), n)};
|
boost::asio::const_buffers_1(s.data(), n)};
|
||||||
multi_buffer b;
|
multi_buffer b;
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
#include "test/beast/http/message_fuzz.hpp"
|
#include "test/beast/http/message_fuzz.hpp"
|
||||||
|
|
||||||
#include <boost/beast/http.hpp>
|
#include <boost/beast/http.hpp>
|
||||||
#include <boost/beast/core/consuming_buffers.hpp>
|
#include <boost/beast/core/buffers_suffix.hpp>
|
||||||
#include <boost/beast/core/ostream.hpp>
|
#include <boost/beast/core/ostream.hpp>
|
||||||
#include <boost/beast/core/flat_buffer.hpp>
|
#include <boost/beast/core/flat_buffer.hpp>
|
||||||
#include <boost/beast/core/multi_buffer.hpp>
|
#include <boost/beast/core/multi_buffer.hpp>
|
||||||
@@ -91,7 +91,7 @@ public:
|
|||||||
error_code& ec)
|
error_code& ec)
|
||||||
{
|
{
|
||||||
using boost::asio::buffer_size;
|
using boost::asio::buffer_size;
|
||||||
beast::consuming_buffers<
|
beast::buffers_suffix<
|
||||||
ConstBufferSequence> cb{buffers};
|
ConstBufferSequence> cb{buffers};
|
||||||
std::size_t used = 0;
|
std::size_t used = 0;
|
||||||
for(;;)
|
for(;;)
|
||||||
|
@@ -168,7 +168,7 @@ boost::asio::ip::tcp::socket sock{ios};
|
|||||||
if(ws.read_some(buffer, 0))
|
if(ws.read_some(buffer, 0))
|
||||||
break;
|
break;
|
||||||
ws.binary(ws.got_binary());
|
ws.binary(ws.got_binary());
|
||||||
consuming_buffers<multi_buffer::const_buffers_type> cb{buffer.data()};
|
buffers_suffix<multi_buffer::const_buffers_type> cb{buffer.data()};
|
||||||
for(;;)
|
for(;;)
|
||||||
{
|
{
|
||||||
using boost::asio::buffer_size;
|
using boost::asio::buffer_size;
|
||||||
|
Reference in New Issue
Block a user