Add RatePolicy to basic_stream

This commit is contained in:
Vinnie Falco
2019-02-19 16:23:30 -08:00
parent 6baa607295
commit 23a7bcc67e
10 changed files with 546 additions and 82 deletions
+1
View File
@@ -59,6 +59,7 @@ add_executable (tests-beast-core
make_strand.cpp
multi_buffer.cpp
ostream.cpp
rate_policy.cpp
read_size.cpp
saved_handler.cpp
span.cpp
+1
View File
@@ -47,6 +47,7 @@ local SOURCES =
make_strand.cpp
multi_buffer.cpp
ostream.cpp
rate_policy.cpp
read_size.cpp
saved_handler.cpp
span.cpp
+12
View File
@@ -31,6 +31,18 @@
namespace boost {
namespace beast {
#if 0
template class basic_stream<
net::ip::tcp,
net::executor,
unlimited_rate_policy>;
template class basic_stream<
net::ip::tcp,
net::executor,
simple_rate_policy>;
#endif
namespace {
template<class Executor = net::io_context::executor_type>
+34
View File
@@ -0,0 +1,34 @@
//
// Copyright (c) 2016-2017 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/rate_policy.hpp>
#include <boost/beast/_experimental/unit_test/suite.hpp>
namespace boost {
namespace beast {
class rate_policy_test : public unit_test::suite
{
public:
void
run() override
{
unlimited_rate_policy{};
simple_rate_policy{};
pass();
}
};
BEAST_DEFINE_TESTSUITE(beast,core,rate_policy);
} // beast
} // boost