forked from boostorg/beast
Add RatePolicy to basic_stream
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user