Add flat_stream to experimental:

This adds a new stream wrapper class template designed to address
a performance shortcoming of boost::asio::ssl::stream.
This commit is contained in:
Vinnie Falco
2018-05-02 08:32:07 -07:00
parent 46e658a91b
commit 6108cf3eb7
17 changed files with 801 additions and 850 deletions
+1
View File
@@ -27,6 +27,7 @@ add_executable (tests-beast
)
add_subdirectory (core)
add_subdirectory (experimental)
add_subdirectory (http)
add_subdirectory (websocket)
add_subdirectory (zlib)
+2
View File
@@ -14,6 +14,7 @@ alias run-tests :
[ compile websocket.cpp ]
[ compile zlib.cpp ]
core//run-tests
experimental//run-tests
http//run-tests
websocket//run-tests
zlib//run-tests
@@ -21,6 +22,7 @@ alias run-tests :
alias fat-tests :
core//fat-tests
experimental//fat-tests
http//fat-tests
websocket//fat-tests
zlib//fat-tests
+23
View File
@@ -0,0 +1,23 @@
#
# 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
#
GroupSources(test/extras/include/boost/beast extras)
GroupSources(subtree/unit_test/include/boost/beast extras)
GroupSources(include/boost/beast beast)
GroupSources(test/beast/experimental "/")
add_executable (tests-beast-experimental
${BOOST_BEAST_FILES}
${EXTRAS_FILES}
${TEST_MAIN}
Jamfile
flat_stream.cpp
)
set_property(TARGET tests-beast-experimental PROPERTY FOLDER "tests")
+25
View File
@@ -0,0 +1,25 @@
#
# 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
#
local SOURCES =
flat_stream.cpp
;
local RUN_TESTS ;
for local f in $(SOURCES)
{
RUN_TESTS += [ run $(f) $(TEST_MAIN) ] ;
}
alias run-tests : $(RUN_TESTS) ;
exe fat-tests : $(TEST_MAIN) $(SOURCES) ;
explicit fat-tests ;
@@ -8,7 +8,7 @@
//
// Test that header file is self-contained.
#include <example/common/flat_stream.hpp>
#include <boost/beast/experimental/core/flat_stream.hpp>
#include <boost/beast/test/websocket.hpp>
#include <boost/beast/test/yield_to.hpp>
@@ -39,7 +39,7 @@ public:
for(auto const n : v0)
v.emplace_back("", n);
auto const result =
::detail::flat_stream_base::coalesce(v, limit);
boost::beast::detail::flat_stream_base::coalesce(v, limit);
BEAST_EXPECT(result.first == count);
BEAST_EXPECT(result.second == copy);
return result;
-1
View File
@@ -20,7 +20,6 @@ add_executable (tests-example-common
${TEST_MAIN}
Jamfile
detect_ssl.cpp
flat_stream.cpp
root_certificates.cpp
server_certificate.cpp
session_alloc.cpp
-1
View File
@@ -9,7 +9,6 @@
local SOURCES =
detect_ssl.cpp
flat_stream.cpp
root_certificates.cpp
server_certificate.cpp
session_alloc.cpp