forked from boostorg/beast
buffer_size is in buffer_traits.hpp
This commit is contained in:
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
#include <boost/beast/core/async_base.hpp>
|
#include <boost/beast/core/async_base.hpp>
|
||||||
#include <boost/beast/core/bind_handler.hpp>
|
#include <boost/beast/core/bind_handler.hpp>
|
||||||
#include <boost/beast/core/buffer_size.hpp>
|
#include <boost/beast/core/buffer_traits.hpp>
|
||||||
#include <boost/beast/core/buffers_adaptor.hpp>
|
#include <boost/beast/core/buffers_adaptor.hpp>
|
||||||
#include <boost/beast/core/buffers_prefix.hpp>
|
#include <boost/beast/core/buffers_prefix.hpp>
|
||||||
#include <boost/beast/core/buffers_suffix.hpp>
|
#include <boost/beast/core/buffers_suffix.hpp>
|
||||||
|
@@ -11,9 +11,10 @@
|
|||||||
#define BOOST_BEAST_TEST_IMPL_STREAM_HPP
|
#define BOOST_BEAST_TEST_IMPL_STREAM_HPP
|
||||||
|
|
||||||
#include <boost/beast/core/bind_handler.hpp>
|
#include <boost/beast/core/bind_handler.hpp>
|
||||||
#include <boost/beast/core/buffer_size.hpp>
|
#include <boost/beast/core/buffer_traits.hpp>
|
||||||
#include <boost/beast/core/buffers_prefix.hpp>
|
#include <boost/beast/core/buffers_prefix.hpp>
|
||||||
#include <boost/beast/core/detail/service_base.hpp>
|
#include <boost/beast/core/detail/service_base.hpp>
|
||||||
|
#include <boost/beast/core/detail/type_traits.hpp>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
#include <boost/beast/_experimental/test/stream.hpp>
|
#include <boost/beast/_experimental/test/stream.hpp>
|
||||||
#include <boost/beast/core/bind_handler.hpp>
|
#include <boost/beast/core/bind_handler.hpp>
|
||||||
#include <boost/beast/core/buffer_size.hpp>
|
#include <boost/beast/core/buffer_traits.hpp>
|
||||||
#include <boost/beast/core/buffers_prefix.hpp>
|
#include <boost/beast/core/buffers_prefix.hpp>
|
||||||
#include <boost/make_shared.hpp>
|
#include <boost/make_shared.hpp>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
@@ -15,7 +15,6 @@
|
|||||||
#include <boost/beast/core/async_base.hpp>
|
#include <boost/beast/core/async_base.hpp>
|
||||||
#include <boost/beast/core/basic_stream.hpp>
|
#include <boost/beast/core/basic_stream.hpp>
|
||||||
#include <boost/beast/core/bind_handler.hpp>
|
#include <boost/beast/core/bind_handler.hpp>
|
||||||
#include <boost/beast/core/buffer_size.hpp>
|
|
||||||
#include <boost/beast/core/buffer_traits.hpp>
|
#include <boost/beast/core/buffer_traits.hpp>
|
||||||
#include <boost/beast/core/buffered_read_stream.hpp>
|
#include <boost/beast/core/buffered_read_stream.hpp>
|
||||||
#include <boost/beast/core/buffers_adaptor.hpp>
|
#include <boost/beast/core/buffers_adaptor.hpp>
|
||||||
|
@@ -11,133 +11,6 @@
|
|||||||
#define BOOST_BEAST_BUFFER_SIZE_HPP
|
#define BOOST_BEAST_BUFFER_SIZE_HPP
|
||||||
|
|
||||||
#include <boost/beast/core/detail/config.hpp>
|
#include <boost/beast/core/detail/config.hpp>
|
||||||
#include <boost/beast/core/detail/static_const.hpp>
|
#include <boost/beast/core/buffer_traits.hpp>
|
||||||
#include <boost/beast/core/detail/type_traits.hpp>
|
|
||||||
#include <boost/asio/buffer.hpp>
|
|
||||||
#include <boost/type_traits/make_void.hpp>
|
|
||||||
#include <type_traits>
|
|
||||||
|
|
||||||
namespace boost {
|
|
||||||
namespace beast {
|
|
||||||
|
|
||||||
namespace detail {
|
|
||||||
|
|
||||||
template<class T, class = void>
|
|
||||||
struct has_buffer_size_impl : std::false_type
|
|
||||||
{
|
|
||||||
};
|
|
||||||
|
|
||||||
template<class T>
|
|
||||||
struct has_buffer_size_impl<T, boost::void_t<
|
|
||||||
decltype(std::declval<std::size_t&>() =
|
|
||||||
std::declval<T const&>().buffer_size_impl())>>
|
|
||||||
: std::true_type
|
|
||||||
{
|
|
||||||
};
|
|
||||||
|
|
||||||
struct buffer_size_impl
|
|
||||||
{
|
|
||||||
template<
|
|
||||||
class B,
|
|
||||||
class = typename std::enable_if<
|
|
||||||
std::is_convertible<
|
|
||||||
B, net::const_buffer>::value>::type>
|
|
||||||
std::size_t
|
|
||||||
operator()(B const& b) const
|
|
||||||
{
|
|
||||||
return net::const_buffer(b).size();
|
|
||||||
}
|
|
||||||
|
|
||||||
template<
|
|
||||||
class B,
|
|
||||||
class = typename std::enable_if<
|
|
||||||
! std::is_convertible<
|
|
||||||
B, net::const_buffer>::value>::type,
|
|
||||||
class = typename std::enable_if<
|
|
||||||
net::is_const_buffer_sequence<B>::value &&
|
|
||||||
! has_buffer_size_impl<B>::value>::type>
|
|
||||||
std::size_t
|
|
||||||
operator()(B const& b) const
|
|
||||||
{
|
|
||||||
using net::buffer_size;
|
|
||||||
return buffer_size(b);
|
|
||||||
}
|
|
||||||
|
|
||||||
template<
|
|
||||||
class B,
|
|
||||||
class = typename std::enable_if<
|
|
||||||
! std::is_convertible<B, net::const_buffer>::value>::type,
|
|
||||||
class = typename std::enable_if<
|
|
||||||
net::is_const_buffer_sequence<B>::value>::type,
|
|
||||||
class = typename std::enable_if<
|
|
||||||
has_buffer_size_impl<B>::value>::type>
|
|
||||||
std::size_t
|
|
||||||
operator()(B const& b) const
|
|
||||||
{
|
|
||||||
return b.buffer_size_impl();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/** Return `true` if a buffer sequence is empty
|
|
||||||
|
|
||||||
This is sometimes faster than using @ref buffer_size
|
|
||||||
*/
|
|
||||||
template<class ConstBufferSequence>
|
|
||||||
bool
|
|
||||||
buffers_empty(ConstBufferSequence const& buffers)
|
|
||||||
{
|
|
||||||
auto it = net::buffer_sequence_begin(buffers);
|
|
||||||
auto end = net::buffer_sequence_end(buffers);
|
|
||||||
while(it != end)
|
|
||||||
{
|
|
||||||
if(net::const_buffer(*it).size() > 0)
|
|
||||||
return false;
|
|
||||||
++it;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // detail
|
|
||||||
|
|
||||||
/** Return the total number of bytes in a buffer or buffer sequence
|
|
||||||
|
|
||||||
This function returns the total number of bytes in a buffer,
|
|
||||||
buffer sequence, or object convertible to a buffer. Specifically
|
|
||||||
it may be passed:
|
|
||||||
|
|
||||||
@li A <em>ConstBufferSequence</em> or <em>MutableBufferSequence</em>
|
|
||||||
|
|
||||||
@li A `net::const_buffer` or `net::mutable_buffer`
|
|
||||||
|
|
||||||
@li An object convertible to `net::const_buffer`
|
|
||||||
|
|
||||||
This function is designed as an easier-to-use replacement for
|
|
||||||
`net::buffer_size`. It recognizes customization points found through
|
|
||||||
argument-dependent lookup. The call `beast::buffer_size(b)` is
|
|
||||||
equivalent to performing:
|
|
||||||
@code
|
|
||||||
using namespace net;
|
|
||||||
buffer_size(b);
|
|
||||||
@endcode
|
|
||||||
In addition this handles types which are convertible to
|
|
||||||
`net::const_buffer`; these are not handled by `net::buffer_size`.
|
|
||||||
|
|
||||||
@note It is expected that a future version of Networking will
|
|
||||||
incorporate the features of this function.
|
|
||||||
|
|
||||||
@param buffers The buffer or buffer sequence to calculate the size of.
|
|
||||||
|
|
||||||
@return The total number of bytes in the buffer or sequence.
|
|
||||||
*/
|
|
||||||
#if BOOST_BEAST_DOXYGEN
|
|
||||||
template<class Buffers>
|
|
||||||
void
|
|
||||||
buffer_size(Buffers const& buffers);
|
|
||||||
#else
|
|
||||||
BOOST_BEAST_INLINE_VARIABLE(buffer_size, detail::buffer_size_impl)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
} // beast
|
|
||||||
} // boost
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -11,6 +11,8 @@
|
|||||||
#define BOOST_BEAST_BUFFER_TRAITS_HPP
|
#define BOOST_BEAST_BUFFER_TRAITS_HPP
|
||||||
|
|
||||||
#include <boost/beast/core/detail/config.hpp>
|
#include <boost/beast/core/detail/config.hpp>
|
||||||
|
#include <boost/beast/core/detail/buffer_traits.hpp>
|
||||||
|
#include <boost/beast/core/detail/static_const.hpp>
|
||||||
#include <boost/asio/buffer.hpp>
|
#include <boost/asio/buffer.hpp>
|
||||||
#include <boost/config/workaround.hpp>
|
#include <boost/config/workaround.hpp>
|
||||||
#include <boost/mp11/function.hpp>
|
#include <boost/mp11/function.hpp>
|
||||||
@@ -104,35 +106,6 @@ using buffers_type = typename std::conditional<
|
|||||||
net::mutable_buffer, net::const_buffer>::type;
|
net::mutable_buffer, net::const_buffer>::type;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if BOOST_WORKAROUND(BOOST_MSVC, < 1910)
|
|
||||||
|
|
||||||
namespace detail {
|
|
||||||
template<class T>
|
|
||||||
struct buffers_iterator_type_helper
|
|
||||||
{
|
|
||||||
using type = decltype(
|
|
||||||
net::buffer_sequence_begin(
|
|
||||||
std::declval<T const&>()));
|
|
||||||
};
|
|
||||||
|
|
||||||
template<>
|
|
||||||
struct buffers_iterator_type_helper<
|
|
||||||
net::const_buffer>
|
|
||||||
{
|
|
||||||
using type = net::const_buffer const*;
|
|
||||||
};
|
|
||||||
|
|
||||||
template<>
|
|
||||||
struct buffers_iterator_type_helper<
|
|
||||||
net::mutable_buffer>
|
|
||||||
{
|
|
||||||
using type = net::mutable_buffer const*;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // detail
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/** Type alias for the iterator type of a buffer sequence type.
|
/** Type alias for the iterator type of a buffer sequence type.
|
||||||
|
|
||||||
This metafunction is used to determine the type of iterator
|
This metafunction is used to determine the type of iterator
|
||||||
@@ -156,6 +129,44 @@ using buffers_iterator_type =
|
|||||||
std::declval<T const&>()));
|
std::declval<T const&>()));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/** Return the total number of bytes in a buffer or buffer sequence
|
||||||
|
|
||||||
|
This function returns the total number of bytes in a buffer,
|
||||||
|
buffer sequence, or object convertible to a buffer. Specifically
|
||||||
|
it may be passed:
|
||||||
|
|
||||||
|
@li A <em>ConstBufferSequence</em> or <em>MutableBufferSequence</em>
|
||||||
|
|
||||||
|
@li A `net::const_buffer` or `net::mutable_buffer`
|
||||||
|
|
||||||
|
@li An object convertible to `net::const_buffer`
|
||||||
|
|
||||||
|
This function is designed as an easier-to-use replacement for
|
||||||
|
`net::buffer_size`. It recognizes customization points found through
|
||||||
|
argument-dependent lookup. The call `beast::buffer_size(b)` is
|
||||||
|
equivalent to performing:
|
||||||
|
@code
|
||||||
|
using namespace net;
|
||||||
|
buffer_size(b);
|
||||||
|
@endcode
|
||||||
|
In addition this handles types which are convertible to
|
||||||
|
`net::const_buffer`; these are not handled by `net::buffer_size`.
|
||||||
|
|
||||||
|
@note It is expected that a future version of Networking will
|
||||||
|
incorporate the features of this function.
|
||||||
|
|
||||||
|
@param buffers The buffer or buffer sequence to calculate the size of.
|
||||||
|
|
||||||
|
@return The total number of bytes in the buffer or sequence.
|
||||||
|
*/
|
||||||
|
#if BOOST_BEAST_DOXYGEN
|
||||||
|
template<class Buffers>
|
||||||
|
void
|
||||||
|
buffer_size(Buffers const& buffers);
|
||||||
|
#else
|
||||||
|
BOOST_BEAST_INLINE_VARIABLE(buffer_size, detail::buffer_size_impl)
|
||||||
|
#endif
|
||||||
|
|
||||||
} // beast
|
} // beast
|
||||||
} // boost
|
} // boost
|
||||||
|
|
||||||
|
@@ -11,7 +11,6 @@
|
|||||||
#define BOOST_BEAST_BUFFERS_PREFIX_HPP
|
#define BOOST_BEAST_BUFFERS_PREFIX_HPP
|
||||||
|
|
||||||
#include <boost/beast/core/detail/config.hpp>
|
#include <boost/beast/core/detail/config.hpp>
|
||||||
#include <boost/beast/core/buffer_size.hpp>
|
|
||||||
#include <boost/beast/core/buffer_traits.hpp>
|
#include <boost/beast/core/buffer_traits.hpp>
|
||||||
#include <boost/optional/optional.hpp> // for in_place_init_t
|
#include <boost/optional/optional.hpp> // for in_place_init_t
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
#define BOOST_BEAST_BUFFERS_TO_STRING_HPP
|
#define BOOST_BEAST_BUFFERS_TO_STRING_HPP
|
||||||
|
|
||||||
#include <boost/beast/core/detail/config.hpp>
|
#include <boost/beast/core/detail/config.hpp>
|
||||||
#include <boost/beast/core/buffer_size.hpp>
|
#include <boost/beast/core/buffer_traits.hpp>
|
||||||
#include <boost/beast/core/buffers_range.hpp>
|
#include <boost/beast/core/buffers_range.hpp>
|
||||||
#include <boost/asio/buffer.hpp>
|
#include <boost/asio/buffer.hpp>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
128
include/boost/beast/core/detail/buffer_traits.hpp
Normal file
128
include/boost/beast/core/detail/buffer_traits.hpp
Normal file
@@ -0,0 +1,128 @@
|
|||||||
|
//
|
||||||
|
// Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com)
|
||||||
|
//
|
||||||
|
// Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||||
|
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
//
|
||||||
|
// Official repository: https://github.com/boostorg/beast
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef BOOST_BEAST_DETAIL_BUFFER_TRAITS_HPP
|
||||||
|
#define BOOST_BEAST_DETAIL_BUFFER_TRAITS_HPP
|
||||||
|
|
||||||
|
#include <boost/asio/buffer.hpp>
|
||||||
|
#include <boost/config/workaround.hpp>
|
||||||
|
#include <boost/type_traits/make_void.hpp>
|
||||||
|
#include <cstdint>
|
||||||
|
#include <type_traits>
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace beast {
|
||||||
|
namespace detail {
|
||||||
|
|
||||||
|
#if BOOST_WORKAROUND(BOOST_MSVC, < 1910)
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
struct buffers_iterator_type_helper
|
||||||
|
{
|
||||||
|
using type = decltype(
|
||||||
|
net::buffer_sequence_begin(
|
||||||
|
std::declval<T const&>()));
|
||||||
|
};
|
||||||
|
|
||||||
|
template<>
|
||||||
|
struct buffers_iterator_type_helper<
|
||||||
|
net::const_buffer>
|
||||||
|
{
|
||||||
|
using type = net::const_buffer const*;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<>
|
||||||
|
struct buffers_iterator_type_helper<
|
||||||
|
net::mutable_buffer>
|
||||||
|
{
|
||||||
|
using type = net::mutable_buffer const*;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
template<class T, class = void>
|
||||||
|
struct has_buffer_size_impl : std::false_type
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
struct has_buffer_size_impl<T, boost::void_t<
|
||||||
|
decltype(std::declval<std::size_t&>() =
|
||||||
|
std::declval<T const&>().buffer_size_impl())>>
|
||||||
|
: std::true_type
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
struct buffer_size_impl
|
||||||
|
{
|
||||||
|
template<
|
||||||
|
class B,
|
||||||
|
class = typename std::enable_if<
|
||||||
|
std::is_convertible<
|
||||||
|
B, net::const_buffer>::value>::type>
|
||||||
|
std::size_t
|
||||||
|
operator()(B const& b) const
|
||||||
|
{
|
||||||
|
return net::const_buffer(b).size();
|
||||||
|
}
|
||||||
|
|
||||||
|
template<
|
||||||
|
class B,
|
||||||
|
class = typename std::enable_if<
|
||||||
|
! std::is_convertible<
|
||||||
|
B, net::const_buffer>::value>::type,
|
||||||
|
class = typename std::enable_if<
|
||||||
|
net::is_const_buffer_sequence<B>::value &&
|
||||||
|
! has_buffer_size_impl<B>::value>::type>
|
||||||
|
std::size_t
|
||||||
|
operator()(B const& b) const
|
||||||
|
{
|
||||||
|
using net::buffer_size;
|
||||||
|
return buffer_size(b);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<
|
||||||
|
class B,
|
||||||
|
class = typename std::enable_if<
|
||||||
|
! std::is_convertible<B, net::const_buffer>::value>::type,
|
||||||
|
class = typename std::enable_if<
|
||||||
|
net::is_const_buffer_sequence<B>::value>::type,
|
||||||
|
class = typename std::enable_if<
|
||||||
|
has_buffer_size_impl<B>::value>::type>
|
||||||
|
std::size_t
|
||||||
|
operator()(B const& b) const
|
||||||
|
{
|
||||||
|
return b.buffer_size_impl();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/** Return `true` if a buffer sequence is empty
|
||||||
|
|
||||||
|
This is sometimes faster than using @ref buffer_size
|
||||||
|
*/
|
||||||
|
template<class ConstBufferSequence>
|
||||||
|
bool
|
||||||
|
buffers_empty(ConstBufferSequence const& buffers)
|
||||||
|
{
|
||||||
|
auto it = net::buffer_sequence_begin(buffers);
|
||||||
|
auto end = net::buffer_sequence_end(buffers);
|
||||||
|
while(it != end)
|
||||||
|
{
|
||||||
|
if(net::const_buffer(*it).size() > 0)
|
||||||
|
return false;
|
||||||
|
++it;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // detail
|
||||||
|
} // beast
|
||||||
|
} // boost
|
||||||
|
|
||||||
|
#endif
|
@@ -10,7 +10,7 @@
|
|||||||
#ifndef BOOST_BEAST_CORE_DETAIL_FLAT_STREAM_HPP
|
#ifndef BOOST_BEAST_CORE_DETAIL_FLAT_STREAM_HPP
|
||||||
#define BOOST_BEAST_CORE_DETAIL_FLAT_STREAM_HPP
|
#define BOOST_BEAST_CORE_DETAIL_FLAT_STREAM_HPP
|
||||||
|
|
||||||
#include <boost/beast/core/buffer_size.hpp>
|
#include <boost/beast/core/buffer_traits.hpp>
|
||||||
#include <boost/asio/buffer.hpp>
|
#include <boost/asio/buffer.hpp>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
#define BOOST_BEAST_CORE_IMPL_BASIC_STREAM_HPP
|
#define BOOST_BEAST_CORE_IMPL_BASIC_STREAM_HPP
|
||||||
|
|
||||||
#include <boost/beast/core/async_base.hpp>
|
#include <boost/beast/core/async_base.hpp>
|
||||||
#include <boost/beast/core/buffer_size.hpp>
|
#include <boost/beast/core/buffer_traits.hpp>
|
||||||
#include <boost/beast/core/buffers_prefix.hpp>
|
#include <boost/beast/core/buffers_prefix.hpp>
|
||||||
#include <boost/beast/core/detail/type_traits.hpp>
|
#include <boost/beast/core/detail/type_traits.hpp>
|
||||||
#include <boost/beast/websocket/teardown.hpp>
|
#include <boost/beast/websocket/teardown.hpp>
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
#ifndef BOOST_BEAST_IMPL_BUFFERS_ADAPTOR_HPP
|
#ifndef BOOST_BEAST_IMPL_BUFFERS_ADAPTOR_HPP
|
||||||
#define BOOST_BEAST_IMPL_BUFFERS_ADAPTOR_HPP
|
#define BOOST_BEAST_IMPL_BUFFERS_ADAPTOR_HPP
|
||||||
|
|
||||||
#include <boost/beast/core/buffer_size.hpp>
|
#include <boost/beast/core/buffer_traits.hpp>
|
||||||
#include <boost/beast/core/detail/type_traits.hpp>
|
#include <boost/beast/core/detail/type_traits.hpp>
|
||||||
#include <boost/asio/buffer.hpp>
|
#include <boost/asio/buffer.hpp>
|
||||||
#include <boost/config/workaround.hpp>
|
#include <boost/config/workaround.hpp>
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
#ifndef BOOST_BEAST_IMPL_BUFFERS_PREFIX_HPP
|
#ifndef BOOST_BEAST_IMPL_BUFFERS_PREFIX_HPP
|
||||||
#define BOOST_BEAST_IMPL_BUFFERS_PREFIX_HPP
|
#define BOOST_BEAST_IMPL_BUFFERS_PREFIX_HPP
|
||||||
|
|
||||||
#include <boost/beast/core/buffer_size.hpp>
|
#include <boost/beast/core/buffer_traits.hpp>
|
||||||
#include <boost/config/workaround.hpp>
|
#include <boost/config/workaround.hpp>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
#ifndef BOOST_BEAST_IMPL_BUFFERS_SUFFIX_HPP
|
#ifndef BOOST_BEAST_IMPL_BUFFERS_SUFFIX_HPP
|
||||||
#define BOOST_BEAST_IMPL_BUFFERS_SUFFIX_HPP
|
#define BOOST_BEAST_IMPL_BUFFERS_SUFFIX_HPP
|
||||||
|
|
||||||
#include <boost/beast/core/buffer_size.hpp>
|
#include <boost/beast/core/buffer_traits.hpp>
|
||||||
#include <boost/beast/core/buffer_traits.hpp>
|
#include <boost/beast/core/buffer_traits.hpp>
|
||||||
#include <boost/type_traits.hpp>
|
#include <boost/type_traits.hpp>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
#ifndef BOOST_BEAST_IMPL_MULTI_BUFFER_HPP
|
#ifndef BOOST_BEAST_IMPL_MULTI_BUFFER_HPP
|
||||||
#define BOOST_BEAST_IMPL_MULTI_BUFFER_HPP
|
#define BOOST_BEAST_IMPL_MULTI_BUFFER_HPP
|
||||||
|
|
||||||
#include <boost/beast/core/buffer_size.hpp>
|
#include <boost/beast/core/buffer_traits.hpp>
|
||||||
#include <boost/beast/core/detail/type_traits.hpp>
|
#include <boost/beast/core/detail/type_traits.hpp>
|
||||||
#include <boost/config/workaround.hpp>
|
#include <boost/config/workaround.hpp>
|
||||||
#include <boost/core/exchange.hpp>
|
#include <boost/core/exchange.hpp>
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
#define BOOST_BEAST_MAKE_PRINTABLE_HPP
|
#define BOOST_BEAST_MAKE_PRINTABLE_HPP
|
||||||
|
|
||||||
#include <boost/beast/core/detail/config.hpp>
|
#include <boost/beast/core/detail/config.hpp>
|
||||||
#include <boost/beast/core/buffer_size.hpp>
|
#include <boost/beast/core/buffer_traits.hpp>
|
||||||
#include <boost/asio/buffer.hpp>
|
#include <boost/asio/buffer.hpp>
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
|
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
#define BOOST_BEAST_HTTP_BASIC_DYNAMIC_BODY_HPP
|
#define BOOST_BEAST_HTTP_BASIC_DYNAMIC_BODY_HPP
|
||||||
|
|
||||||
#include <boost/beast/core/detail/config.hpp>
|
#include <boost/beast/core/detail/config.hpp>
|
||||||
#include <boost/beast/core/buffer_size.hpp>
|
#include <boost/beast/core/buffer_traits.hpp>
|
||||||
#include <boost/beast/core/detail/buffer.hpp>
|
#include <boost/beast/core/detail/buffer.hpp>
|
||||||
#include <boost/beast/http/error.hpp>
|
#include <boost/beast/http/error.hpp>
|
||||||
#include <boost/beast/http/message.hpp>
|
#include <boost/beast/http/message.hpp>
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
#define BOOST_BEAST_HTTP_BUFFER_BODY_HPP
|
#define BOOST_BEAST_HTTP_BUFFER_BODY_HPP
|
||||||
|
|
||||||
#include <boost/beast/core/detail/config.hpp>
|
#include <boost/beast/core/detail/config.hpp>
|
||||||
#include <boost/beast/core/buffer_size.hpp>
|
#include <boost/beast/core/buffer_traits.hpp>
|
||||||
#include <boost/beast/http/error.hpp>
|
#include <boost/beast/http/error.hpp>
|
||||||
#include <boost/beast/http/message.hpp>
|
#include <boost/beast/http/message.hpp>
|
||||||
#include <boost/beast/http/type_traits.hpp>
|
#include <boost/beast/http/type_traits.hpp>
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
#ifndef BOOST_BEAST_HTTP_IMPL_BASIC_PARSER_HPP
|
#ifndef BOOST_BEAST_HTTP_IMPL_BASIC_PARSER_HPP
|
||||||
#define BOOST_BEAST_HTTP_IMPL_BASIC_PARSER_HPP
|
#define BOOST_BEAST_HTTP_IMPL_BASIC_PARSER_HPP
|
||||||
|
|
||||||
#include <boost/beast/core/buffer_size.hpp>
|
#include <boost/beast/core/buffer_traits.hpp>
|
||||||
#include <boost/asio/buffer.hpp>
|
#include <boost/asio/buffer.hpp>
|
||||||
#include <boost/make_unique.hpp>
|
#include <boost/make_unique.hpp>
|
||||||
|
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
#include <boost/beast/http/basic_parser.hpp>
|
#include <boost/beast/http/basic_parser.hpp>
|
||||||
#include <boost/beast/http/error.hpp>
|
#include <boost/beast/http/error.hpp>
|
||||||
#include <boost/beast/http/rfc7230.hpp>
|
#include <boost/beast/http/rfc7230.hpp>
|
||||||
#include <boost/beast/core/buffer_size.hpp>
|
#include <boost/beast/core/buffer_traits.hpp>
|
||||||
#include <boost/beast/core/static_string.hpp>
|
#include <boost/beast/core/static_string.hpp>
|
||||||
#include <boost/beast/core/detail/clamp.hpp>
|
#include <boost/beast/core/detail/clamp.hpp>
|
||||||
#include <boost/beast/core/detail/config.hpp>
|
#include <boost/beast/core/detail/config.hpp>
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
#ifndef BOOST_BEAST_HTTP_IMPL_CHUNK_ENCODE_HPP
|
#ifndef BOOST_BEAST_HTTP_IMPL_CHUNK_ENCODE_HPP
|
||||||
#define BOOST_BEAST_HTTP_IMPL_CHUNK_ENCODE_HPP
|
#define BOOST_BEAST_HTTP_IMPL_CHUNK_ENCODE_HPP
|
||||||
|
|
||||||
#include <boost/beast/core/buffer_size.hpp>
|
#include <boost/beast/core/buffer_traits.hpp>
|
||||||
#include <boost/beast/core/detail/varint.hpp>
|
#include <boost/beast/core/detail/varint.hpp>
|
||||||
#include <boost/beast/http/error.hpp>
|
#include <boost/beast/http/error.hpp>
|
||||||
#include <boost/beast/http/detail/rfc7230.hpp>
|
#include <boost/beast/http/detail/rfc7230.hpp>
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
#ifndef BOOST_BEAST_HTTP_IMPL_SERIALIZER_HPP
|
#ifndef BOOST_BEAST_HTTP_IMPL_SERIALIZER_HPP
|
||||||
#define BOOST_BEAST_HTTP_IMPL_SERIALIZER_HPP
|
#define BOOST_BEAST_HTTP_IMPL_SERIALIZER_HPP
|
||||||
|
|
||||||
#include <boost/beast/core/buffer_size.hpp>
|
#include <boost/beast/core/buffer_traits.hpp>
|
||||||
#include <boost/beast/core/detail/buffers_ref.hpp>
|
#include <boost/beast/core/detail/buffers_ref.hpp>
|
||||||
#include <boost/beast/http/error.hpp>
|
#include <boost/beast/http/error.hpp>
|
||||||
#include <boost/beast/http/status.hpp>
|
#include <boost/beast/http/status.hpp>
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
#define BOOST_BEAST_HTTP_SPAN_BODY_HPP
|
#define BOOST_BEAST_HTTP_SPAN_BODY_HPP
|
||||||
|
|
||||||
#include <boost/beast/core/detail/config.hpp>
|
#include <boost/beast/core/detail/config.hpp>
|
||||||
#include <boost/beast/core/buffer_size.hpp>
|
#include <boost/beast/core/buffer_traits.hpp>
|
||||||
#include <boost/beast/core/span.hpp>
|
#include <boost/beast/core/span.hpp>
|
||||||
#include <boost/beast/http/error.hpp>
|
#include <boost/beast/http/error.hpp>
|
||||||
#include <boost/beast/http/message.hpp>
|
#include <boost/beast/http/message.hpp>
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
#define BOOST_BEAST_HTTP_STRING_BODY_HPP
|
#define BOOST_BEAST_HTTP_STRING_BODY_HPP
|
||||||
|
|
||||||
#include <boost/beast/core/detail/config.hpp>
|
#include <boost/beast/core/detail/config.hpp>
|
||||||
#include <boost/beast/core/buffer_size.hpp>
|
#include <boost/beast/core/buffer_traits.hpp>
|
||||||
#include <boost/beast/http/error.hpp>
|
#include <boost/beast/http/error.hpp>
|
||||||
#include <boost/beast/http/message.hpp>
|
#include <boost/beast/http/message.hpp>
|
||||||
#include <boost/beast/core/buffers_range.hpp>
|
#include <boost/beast/core/buffers_range.hpp>
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
#define BOOST_BEAST_HTTP_VECTOR_BODY_HPP
|
#define BOOST_BEAST_HTTP_VECTOR_BODY_HPP
|
||||||
|
|
||||||
#include <boost/beast/core/detail/config.hpp>
|
#include <boost/beast/core/detail/config.hpp>
|
||||||
#include <boost/beast/core/buffer_size.hpp>
|
#include <boost/beast/core/buffer_traits.hpp>
|
||||||
#include <boost/beast/http/error.hpp>
|
#include <boost/beast/http/error.hpp>
|
||||||
#include <boost/beast/http/message.hpp>
|
#include <boost/beast/http/message.hpp>
|
||||||
#include <boost/beast/core/detail/clamp.hpp>
|
#include <boost/beast/core/detail/clamp.hpp>
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
#ifndef BOOST_BEAST_WEBSOCKET_DETAIL_FRAME_HPP
|
#ifndef BOOST_BEAST_WEBSOCKET_DETAIL_FRAME_HPP
|
||||||
#define BOOST_BEAST_WEBSOCKET_DETAIL_FRAME_HPP
|
#define BOOST_BEAST_WEBSOCKET_DETAIL_FRAME_HPP
|
||||||
|
|
||||||
#include <boost/beast/core/buffer_size.hpp>
|
#include <boost/beast/core/buffer_traits.hpp>
|
||||||
#include <boost/beast/websocket/error.hpp>
|
#include <boost/beast/websocket/error.hpp>
|
||||||
#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>
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
#include <boost/beast/websocket/option.hpp>
|
#include <boost/beast/websocket/option.hpp>
|
||||||
#include <boost/beast/websocket/detail/frame.hpp>
|
#include <boost/beast/websocket/detail/frame.hpp>
|
||||||
#include <boost/beast/websocket/detail/pmd_extension.hpp>
|
#include <boost/beast/websocket/detail/pmd_extension.hpp>
|
||||||
#include <boost/beast/core/buffer_size.hpp>
|
#include <boost/beast/core/buffer_traits.hpp>
|
||||||
#include <boost/beast/core/role.hpp>
|
#include <boost/beast/core/role.hpp>
|
||||||
#include <boost/beast/http/empty_body.hpp>
|
#include <boost/beast/http/empty_body.hpp>
|
||||||
#include <boost/beast/http/message.hpp>
|
#include <boost/beast/http/message.hpp>
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
#include <boost/beast/http/string_body.hpp>
|
#include <boost/beast/http/string_body.hpp>
|
||||||
#include <boost/beast/http/write.hpp>
|
#include <boost/beast/http/write.hpp>
|
||||||
#include <boost/beast/core/async_base.hpp>
|
#include <boost/beast/core/async_base.hpp>
|
||||||
#include <boost/beast/core/buffer_size.hpp>
|
#include <boost/beast/core/buffer_traits.hpp>
|
||||||
#include <boost/beast/core/stream_traits.hpp>
|
#include <boost/beast/core/stream_traits.hpp>
|
||||||
#include <boost/beast/core/detail/buffer.hpp>
|
#include <boost/beast/core/detail/buffer.hpp>
|
||||||
#include <boost/beast/core/detail/type_traits.hpp>
|
#include <boost/beast/core/detail/type_traits.hpp>
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
#ifndef BOOST_BEAST_WEBSOCKET_IMPL_READ_HPP
|
#ifndef BOOST_BEAST_WEBSOCKET_IMPL_READ_HPP
|
||||||
#define BOOST_BEAST_WEBSOCKET_IMPL_READ_HPP
|
#define BOOST_BEAST_WEBSOCKET_IMPL_READ_HPP
|
||||||
|
|
||||||
#include <boost/beast/core/buffer_size.hpp>
|
#include <boost/beast/core/buffer_traits.hpp>
|
||||||
#include <boost/beast/websocket/teardown.hpp>
|
#include <boost/beast/websocket/teardown.hpp>
|
||||||
#include <boost/beast/websocket/detail/mask.hpp>
|
#include <boost/beast/websocket/detail/mask.hpp>
|
||||||
#include <boost/beast/websocket/impl/stream_impl.hpp>
|
#include <boost/beast/websocket/impl/stream_impl.hpp>
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
#ifndef BOOST_BEAST_WEBSOCKET_IMPL_STREAM_HPP
|
#ifndef BOOST_BEAST_WEBSOCKET_IMPL_STREAM_HPP
|
||||||
#define BOOST_BEAST_WEBSOCKET_IMPL_STREAM_HPP
|
#define BOOST_BEAST_WEBSOCKET_IMPL_STREAM_HPP
|
||||||
|
|
||||||
#include <boost/beast/core/buffer_size.hpp>
|
#include <boost/beast/core/buffer_traits.hpp>
|
||||||
#include <boost/beast/websocket/rfc6455.hpp>
|
#include <boost/beast/websocket/rfc6455.hpp>
|
||||||
#include <boost/beast/websocket/teardown.hpp>
|
#include <boost/beast/websocket/teardown.hpp>
|
||||||
#include <boost/beast/websocket/detail/hybi13.hpp>
|
#include <boost/beast/websocket/detail/hybi13.hpp>
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
#include <boost/beast/websocket/detail/mask.hpp>
|
#include <boost/beast/websocket/detail/mask.hpp>
|
||||||
#include <boost/beast/core/async_base.hpp>
|
#include <boost/beast/core/async_base.hpp>
|
||||||
#include <boost/beast/core/bind_handler.hpp>
|
#include <boost/beast/core/bind_handler.hpp>
|
||||||
#include <boost/beast/core/buffer_size.hpp>
|
#include <boost/beast/core/buffer_traits.hpp>
|
||||||
#include <boost/beast/core/buffers_cat.hpp>
|
#include <boost/beast/core/buffers_cat.hpp>
|
||||||
#include <boost/beast/core/buffers_prefix.hpp>
|
#include <boost/beast/core/buffers_prefix.hpp>
|
||||||
#include <boost/beast/core/buffers_range.hpp>
|
#include <boost/beast/core/buffers_range.hpp>
|
||||||
|
@@ -34,7 +34,6 @@ add_executable (tests-beast-core
|
|||||||
async_base.cpp
|
async_base.cpp
|
||||||
basic_stream.cpp
|
basic_stream.cpp
|
||||||
bind_handler.cpp
|
bind_handler.cpp
|
||||||
buffer_size.cpp
|
|
||||||
buffer_traits.cpp
|
buffer_traits.cpp
|
||||||
buffered_read_stream.cpp
|
buffered_read_stream.cpp
|
||||||
buffers_adapter.cpp
|
buffers_adapter.cpp
|
||||||
|
@@ -22,7 +22,6 @@ local SOURCES =
|
|||||||
async_base.cpp
|
async_base.cpp
|
||||||
basic_stream.cpp
|
basic_stream.cpp
|
||||||
bind_handler.cpp
|
bind_handler.cpp
|
||||||
buffer_size.cpp
|
|
||||||
buffer_traits.cpp
|
buffer_traits.cpp
|
||||||
buffered_read_stream.cpp
|
buffered_read_stream.cpp
|
||||||
buffers_adapter.cpp
|
buffers_adapter.cpp
|
||||||
|
@@ -1,98 +0,0 @@
|
|||||||
//
|
|
||||||
// Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com)
|
|
||||||
//
|
|
||||||
// Distributed under the Boost Software License, Version 1.0. (See accompanying
|
|
||||||
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
|
||||||
//
|
|
||||||
// Official repository: https://github.com/boostorg/beast
|
|
||||||
//
|
|
||||||
|
|
||||||
// Test that header file is self-contained.
|
|
||||||
#include <boost/beast/core/buffer_size.hpp>
|
|
||||||
|
|
||||||
#include <boost/beast/_experimental/unit_test/suite.hpp>
|
|
||||||
#include <boost/beast/core/detail/is_invocable.hpp>
|
|
||||||
|
|
||||||
namespace boost {
|
|
||||||
namespace beast {
|
|
||||||
|
|
||||||
namespace {
|
|
||||||
|
|
||||||
struct sequence
|
|
||||||
{
|
|
||||||
struct value_type
|
|
||||||
{
|
|
||||||
operator net::const_buffer() const noexcept
|
|
||||||
{
|
|
||||||
return {"Hello, world!", 13};
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
using const_iterator = value_type const*;
|
|
||||||
|
|
||||||
const_iterator begin() const noexcept
|
|
||||||
{
|
|
||||||
return &v_;
|
|
||||||
}
|
|
||||||
|
|
||||||
const_iterator end() const noexcept
|
|
||||||
{
|
|
||||||
return begin() + 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
value_type v_;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct not_sequence
|
|
||||||
{
|
|
||||||
};
|
|
||||||
|
|
||||||
} // (anon)
|
|
||||||
|
|
||||||
class buffer_size_test : public beast::unit_test::suite
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
void
|
|
||||||
testJavadocs()
|
|
||||||
{
|
|
||||||
pass();
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
testFunction()
|
|
||||||
{
|
|
||||||
BEAST_EXPECT(buffer_size(
|
|
||||||
net::const_buffer("Hello, world!", 13)) == 13);
|
|
||||||
|
|
||||||
BEAST_EXPECT(buffer_size(
|
|
||||||
net::mutable_buffer{}) == 0);
|
|
||||||
|
|
||||||
{
|
|
||||||
sequence s;
|
|
||||||
BEAST_EXPECT(buffer_size(s) == 13);
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
std::array<net::const_buffer, 2> s({{
|
|
||||||
net::const_buffer("Hello, world!", 13),
|
|
||||||
net::const_buffer("Hello, world!", 13)}});
|
|
||||||
BEAST_EXPECT(buffer_size(s) == 26);
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOST_STATIC_ASSERT(! detail::is_invocable<
|
|
||||||
detail::buffer_size_impl,
|
|
||||||
std::size_t(not_sequence const&)>::value);
|
|
||||||
}
|
|
||||||
|
|
||||||
void run() override
|
|
||||||
{
|
|
||||||
testFunction();
|
|
||||||
testJavadocs();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
BEAST_DEFINE_TESTSUITE(beast,core,buffer_size);
|
|
||||||
|
|
||||||
} // beast
|
|
||||||
} // boost
|
|
@@ -11,11 +11,46 @@
|
|||||||
#include <boost/beast/core/buffer_traits.hpp>
|
#include <boost/beast/core/buffer_traits.hpp>
|
||||||
|
|
||||||
#include <boost/beast/_experimental/unit_test/suite.hpp>
|
#include <boost/beast/_experimental/unit_test/suite.hpp>
|
||||||
|
#include <boost/beast/core/detail/type_traits.hpp>
|
||||||
#include <array>
|
#include <array>
|
||||||
|
|
||||||
namespace boost {
|
namespace boost {
|
||||||
namespace beast {
|
namespace beast {
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
struct sequence
|
||||||
|
{
|
||||||
|
struct value_type
|
||||||
|
{
|
||||||
|
operator net::const_buffer() const noexcept
|
||||||
|
{
|
||||||
|
return {"Hello, world!", 13};
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
using const_iterator = value_type const*;
|
||||||
|
|
||||||
|
const_iterator begin() const noexcept
|
||||||
|
{
|
||||||
|
return &v_;
|
||||||
|
}
|
||||||
|
|
||||||
|
const_iterator end() const noexcept
|
||||||
|
{
|
||||||
|
return begin() + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
value_type v_;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct not_sequence
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
} // (anon)
|
||||||
|
|
||||||
class buffer_traits_test : public beast::unit_test::suite
|
class buffer_traits_test : public beast::unit_test::suite
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -168,9 +203,36 @@ public:
|
|||||||
pass();
|
pass();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
testFunction()
|
||||||
|
{
|
||||||
|
BEAST_EXPECT(buffer_size(
|
||||||
|
net::const_buffer("Hello, world!", 13)) == 13);
|
||||||
|
|
||||||
|
BEAST_EXPECT(buffer_size(
|
||||||
|
net::mutable_buffer{}) == 0);
|
||||||
|
|
||||||
|
{
|
||||||
|
sequence s;
|
||||||
|
BEAST_EXPECT(buffer_size(s) == 13);
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
std::array<net::const_buffer, 2> s({{
|
||||||
|
net::const_buffer("Hello, world!", 13),
|
||||||
|
net::const_buffer("Hello, world!", 13)}});
|
||||||
|
BEAST_EXPECT(buffer_size(s) == 26);
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOST_STATIC_ASSERT(! detail::is_invocable<
|
||||||
|
detail::buffer_size_impl,
|
||||||
|
std::size_t(not_sequence const&)>::value);
|
||||||
|
}
|
||||||
|
|
||||||
void run() override
|
void run() override
|
||||||
{
|
{
|
||||||
testJavadocs();
|
testJavadocs();
|
||||||
|
testFunction();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
#include "test_buffer.hpp"
|
#include "test_buffer.hpp"
|
||||||
|
|
||||||
#include <boost/beast/core/buffer_size.hpp>
|
#include <boost/beast/core/buffer_traits.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/core/read_size.hpp>
|
#include <boost/beast/core/read_size.hpp>
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
#include "test_buffer.hpp"
|
#include "test_buffer.hpp"
|
||||||
|
|
||||||
#include <boost/beast/_experimental/unit_test/suite.hpp>
|
#include <boost/beast/_experimental/unit_test/suite.hpp>
|
||||||
#include <boost/beast/core/buffer_size.hpp>
|
#include <boost/beast/core/buffer_traits.hpp>
|
||||||
#include <boost/beast/core/buffers_prefix.hpp>
|
#include <boost/beast/core/buffers_prefix.hpp>
|
||||||
#include <boost/beast/core/buffers_suffix.hpp>
|
#include <boost/beast/core/buffers_suffix.hpp>
|
||||||
#include <boost/asio/buffer.hpp>
|
#include <boost/asio/buffer.hpp>
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
#include "test_buffer.hpp"
|
#include "test_buffer.hpp"
|
||||||
|
|
||||||
#include <boost/beast/core/buffer_size.hpp>
|
#include <boost/beast/core/buffer_traits.hpp>
|
||||||
#include <boost/beast/core/buffers_to_string.hpp>
|
#include <boost/beast/core/buffers_to_string.hpp>
|
||||||
#include <boost/beast/_experimental/unit_test/suite.hpp>
|
#include <boost/beast/_experimental/unit_test/suite.hpp>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
#include "test_buffer.hpp"
|
#include "test_buffer.hpp"
|
||||||
|
|
||||||
#include <boost/beast/core/buffer_size.hpp>
|
#include <boost/beast/core/buffer_traits.hpp>
|
||||||
#include <boost/beast/core/buffers_cat.hpp>
|
#include <boost/beast/core/buffers_cat.hpp>
|
||||||
#include <boost/beast/_experimental/unit_test/suite.hpp>
|
#include <boost/beast/_experimental/unit_test/suite.hpp>
|
||||||
#include <boost/asio/buffer.hpp>
|
#include <boost/asio/buffer.hpp>
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
#include "test_buffer.hpp"
|
#include "test_buffer.hpp"
|
||||||
|
|
||||||
#include <boost/beast/core/buffer_size.hpp>
|
#include <boost/beast/core/buffer_traits.hpp>
|
||||||
#include <boost/beast/core/ostream.hpp>
|
#include <boost/beast/core/ostream.hpp>
|
||||||
#include <boost/beast/core/read_size.hpp>
|
#include <boost/beast/core/read_size.hpp>
|
||||||
#include <boost/beast/core/string.hpp>
|
#include <boost/beast/core/string.hpp>
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
#include <boost/beast/core/make_printable.hpp>
|
#include <boost/beast/core/make_printable.hpp>
|
||||||
|
|
||||||
#include <boost/beast/_experimental/unit_test/suite.hpp>
|
#include <boost/beast/_experimental/unit_test/suite.hpp>
|
||||||
#include <boost/beast/core/buffer_size.hpp>
|
#include <boost/beast/core/buffer_traits.hpp>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
#include "test_buffer.hpp"
|
#include "test_buffer.hpp"
|
||||||
|
|
||||||
#include <boost/beast/core/buffer_size.hpp>
|
#include <boost/beast/core/buffer_traits.hpp>
|
||||||
#include <boost/beast/core/ostream.hpp>
|
#include <boost/beast/core/ostream.hpp>
|
||||||
#include <boost/beast/core/read_size.hpp>
|
#include <boost/beast/core/read_size.hpp>
|
||||||
#include <boost/beast/core/string.hpp>
|
#include <boost/beast/core/string.hpp>
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
#include "test_buffer.hpp"
|
#include "test_buffer.hpp"
|
||||||
|
|
||||||
#include <boost/beast/core/buffer_size.hpp>
|
#include <boost/beast/core/buffer_traits.hpp>
|
||||||
#include <boost/beast/core/ostream.hpp>
|
#include <boost/beast/core/ostream.hpp>
|
||||||
#include <boost/beast/core/read_size.hpp>
|
#include <boost/beast/core/read_size.hpp>
|
||||||
#include <boost/beast/core/string.hpp>
|
#include <boost/beast/core/string.hpp>
|
||||||
|
@@ -12,7 +12,6 @@
|
|||||||
|
|
||||||
#include <boost/beast/core/detail/config.hpp>
|
#include <boost/beast/core/detail/config.hpp>
|
||||||
#include <boost/beast/_experimental/unit_test/suite.hpp>
|
#include <boost/beast/_experimental/unit_test/suite.hpp>
|
||||||
#include <boost/beast/core/buffer_size.hpp>
|
|
||||||
#include <boost/beast/core/buffer_traits.hpp>
|
#include <boost/beast/core/buffer_traits.hpp>
|
||||||
#include <boost/beast/core/buffers_to_string.hpp>
|
#include <boost/beast/core/buffers_to_string.hpp>
|
||||||
#include <boost/beast/core/string.hpp>
|
#include <boost/beast/core/string.hpp>
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
#include "message_fuzz.hpp"
|
#include "message_fuzz.hpp"
|
||||||
#include "test_parser.hpp"
|
#include "test_parser.hpp"
|
||||||
|
|
||||||
#include <boost/beast/core/buffer_size.hpp>
|
#include <boost/beast/core/buffer_traits.hpp>
|
||||||
#include <boost/beast/core/buffers_cat.hpp>
|
#include <boost/beast/core/buffers_cat.hpp>
|
||||||
#include <boost/beast/core/buffers_prefix.hpp>
|
#include <boost/beast/core/buffers_prefix.hpp>
|
||||||
#include <boost/beast/core/buffers_suffix.hpp>
|
#include <boost/beast/core/buffers_suffix.hpp>
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
// Test that header file is self-contained.
|
// Test that header file is self-contained.
|
||||||
#include <boost/beast/http/file_body.hpp>
|
#include <boost/beast/http/file_body.hpp>
|
||||||
|
|
||||||
#include <boost/beast/core/buffer_size.hpp>
|
#include <boost/beast/core/buffer_traits.hpp>
|
||||||
#include <boost/beast/core/buffers_prefix.hpp>
|
#include <boost/beast/core/buffers_prefix.hpp>
|
||||||
#include <boost/beast/core/file_stdio.hpp>
|
#include <boost/beast/core/file_stdio.hpp>
|
||||||
#include <boost/beast/core/flat_buffer.hpp>
|
#include <boost/beast/core/flat_buffer.hpp>
|
||||||
|
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
#include <boost/beast/_experimental/unit_test/suite.hpp>
|
#include <boost/beast/_experimental/unit_test/suite.hpp>
|
||||||
#include <boost/beast/test/yield_to.hpp>
|
#include <boost/beast/test/yield_to.hpp>
|
||||||
#include <boost/beast/core/buffer_size.hpp>
|
#include <boost/beast/core/buffer_traits.hpp>
|
||||||
#include <boost/beast/core/buffers_suffix.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>
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
// Test that header file is self-contained.
|
// Test that header file is self-contained.
|
||||||
#include <boost/beast/http/serializer.hpp>
|
#include <boost/beast/http/serializer.hpp>
|
||||||
|
|
||||||
#include <boost/beast/core/buffer_size.hpp>
|
#include <boost/beast/core/buffer_traits.hpp>
|
||||||
#include <boost/beast/http/string_body.hpp>
|
#include <boost/beast/http/string_body.hpp>
|
||||||
#include <boost/beast/_experimental/unit_test/suite.hpp>
|
#include <boost/beast/_experimental/unit_test/suite.hpp>
|
||||||
|
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
// Test that header file is self-contained.
|
// Test that header file is self-contained.
|
||||||
#include <boost/beast/http/span_body.hpp>
|
#include <boost/beast/http/span_body.hpp>
|
||||||
|
|
||||||
#include <boost/beast/core/buffer_size.hpp>
|
#include <boost/beast/core/buffer_traits.hpp>
|
||||||
#include <boost/beast/http/message.hpp>
|
#include <boost/beast/http/message.hpp>
|
||||||
#include <boost/beast/_experimental/unit_test/suite.hpp>
|
#include <boost/beast/_experimental/unit_test/suite.hpp>
|
||||||
|
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
#define BEAST_TEST_WEBSOCKET_TEST_HPP
|
#define BEAST_TEST_WEBSOCKET_TEST_HPP
|
||||||
|
|
||||||
#include <boost/beast/core/bind_handler.hpp>
|
#include <boost/beast/core/bind_handler.hpp>
|
||||||
#include <boost/beast/core/buffer_size.hpp>
|
#include <boost/beast/core/buffer_traits.hpp>
|
||||||
#include <boost/beast/core/buffers_prefix.hpp>
|
#include <boost/beast/core/buffers_prefix.hpp>
|
||||||
#include <boost/beast/core/buffers_to_string.hpp>
|
#include <boost/beast/core/buffers_to_string.hpp>
|
||||||
#include <boost/beast/core/ostream.hpp>
|
#include <boost/beast/core/ostream.hpp>
|
||||||
|
@@ -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/buffer_size.hpp>
|
#include <boost/beast/core/buffer_traits.hpp>
|
||||||
#include <boost/beast/core/buffers_suffix.hpp>
|
#include <boost/beast/core/buffers_suffix.hpp>
|
||||||
#include <boost/beast/core/buffers_to_string.hpp>
|
#include <boost/beast/core/buffers_to_string.hpp>
|
||||||
#include <boost/beast/core/ostream.hpp>
|
#include <boost/beast/core/ostream.hpp>
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
// Official repository: https://github.com/boostorg/beast
|
// Official repository: https://github.com/boostorg/beast
|
||||||
//
|
//
|
||||||
|
|
||||||
#include <boost/beast/core/buffer_size.hpp>
|
#include <boost/beast/core/buffer_traits.hpp>
|
||||||
#include <boost/beast/core/error.hpp>
|
#include <boost/beast/core/error.hpp>
|
||||||
#include <boost/beast/core/file_base.hpp>
|
#include <boost/beast/core/file_base.hpp>
|
||||||
#include <boost/beast/http/message.hpp>
|
#include <boost/beast/http/message.hpp>
|
||||||
|
Reference in New Issue
Block a user