diff --git a/CMakeLists.txt b/CMakeLists.txt index 40aad88..53207ec 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ # 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/cppalliance/http_io +# Official repository: https://github.com/cppalliance/beast2 # #------------------------------------------------- @@ -16,14 +16,14 @@ # #------------------------------------------------- cmake_minimum_required(VERSION 3.8...3.20) -set(BOOST_HTTP_IO_VERSION 1) +set(BOOST_BEAST2_VERSION 1) if (BOOST_SUPERPROJECT_VERSION) - set(BOOST_HTTP_IO_VERSION ${BOOST_SUPERPROJECT_VERSION}) + set(BOOST_BEAST2_VERSION ${BOOST_SUPERPROJECT_VERSION}) endif () -project(boost_http_io VERSION "${BOOST_HTTP_IO_VERSION}" LANGUAGES CXX) -set(BOOST_HTTP_IO_IS_ROOT OFF) +project(boost_beast2 VERSION "${BOOST_BEAST2_VERSION}" LANGUAGES CXX) +set(BOOST_BEAST2_IS_ROOT OFF) if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) - set(BOOST_HTTP_IO_IS_ROOT ON) + set(BOOST_BEAST2_IS_ROOT ON) endif () set(__ignore__ ${CMAKE_C_COMPILER}) @@ -32,12 +32,12 @@ set(__ignore__ ${CMAKE_C_COMPILER}) # Options # #------------------------------------------------- -if (BOOST_HTTP_IO_IS_ROOT) +if (BOOST_BEAST2_IS_ROOT) include(CTest) endif () -option(BOOST_HTTP_IO_BUILD_TESTS "Build boost::http_io tests" ${BUILD_TESTING}) -option(BOOST_HTTP_IO_BUILD_EXAMPLES "Build boost::http_io examples" ${BOOST_HTTP_IO_IS_ROOT}) -option(BOOST_HTTP_IO_MRDOCS_BUILD "Build the target for MrDocs: see mrdocs.yml" OFF) +option(BOOST_BEAST2_BUILD_TESTS "Build boost::beast2 tests" ${BUILD_TESTING}) +option(BOOST_BEAST2_BUILD_EXAMPLES "Build boost::beast2 examples" ${BOOST_BEAST2_IS_ROOT}) +option(BOOST_BEAST2_MRDOCS_BUILD "Build the target for MrDocs: see mrdocs.yml" OFF) # Check if environment variable BOOST_SRC_DIR is set @@ -54,7 +54,7 @@ set(BOOST_SRC_DIR ${DEFAULT_BOOST_SRC_DIR} CACHE STRING "Boost source dir to use # #------------------------------------------------- # The boost super-project requires one explicit dependency per-line. -set(BOOST_HTTP_IO_DEPENDENCIES +set(BOOST_BEAST2_DEPENDENCIES Boost::asio Boost::assert Boost::config @@ -63,28 +63,28 @@ set(BOOST_HTTP_IO_DEPENDENCIES Boost::throw_exception ) -foreach (BOOST_HTTP_IO_DEPENDENCY ${BOOST_HTTP_IO_DEPENDENCIES}) - if (BOOST_HTTP_IO_DEPENDENCY MATCHES "^[ ]*Boost::([A-Za-z0-9_]+)[ ]*$") - list(APPEND BOOST_HTTP_IO_INCLUDE_LIBRARIES ${CMAKE_MATCH_1}) +foreach (BOOST_BEAST2_DEPENDENCY ${BOOST_BEAST2_DEPENDENCIES}) + if (BOOST_BEAST2_DEPENDENCY MATCHES "^[ ]*Boost::([A-Za-z0-9_]+)[ ]*$") + list(APPEND BOOST_BEAST2_INCLUDE_LIBRARIES ${CMAKE_MATCH_1}) endif () endforeach () # Conditional dependencies -if (BOOST_HTTP_IO_BUILD_TESTS) - set(BOOST_HTTP_IO_UNIT_TEST_LIBRARIES beast url) +if (BOOST_BEAST2_BUILD_TESTS) + set(BOOST_BEAST2_UNIT_TEST_LIBRARIES beast url) endif () -if (BOOST_HTTP_IO_BUILD_EXAMPLES) - set(BOOST_HTTP_IO_EXAMPLE_LIBRARIES json program_options scope url multiprecision) +if (BOOST_BEAST2_BUILD_EXAMPLES) + set(BOOST_BEAST2_EXAMPLE_LIBRARIES json program_options scope url multiprecision) endif () # Complete dependency list -set(BOOST_INCLUDE_LIBRARIES ${BOOST_HTTP_IO_INCLUDE_LIBRARIES} ${BOOST_HTTP_IO_UNIT_TEST_LIBRARIES} ${BOOST_HTTP_IO_EXAMPLE_LIBRARIES}) -set(BOOST_EXCLUDE_LIBRARIES http_io) +set(BOOST_INCLUDE_LIBRARIES ${BOOST_BEAST2_INCLUDE_LIBRARIES} ${BOOST_BEAST2_UNIT_TEST_LIBRARIES} ${BOOST_BEAST2_EXAMPLE_LIBRARIES}) +set(BOOST_EXCLUDE_LIBRARIES beast2) #------------------------------------------------- # # Add Boost Subdirectory # #------------------------------------------------- -if (BOOST_HTTP_IO_IS_ROOT) +if (BOOST_BEAST2_IS_ROOT) set(CMAKE_FOLDER Dependencies) # Find absolute BOOST_SRC_DIR if (NOT IS_ABSOLUTE ${BOOST_SRC_DIR}) @@ -132,50 +132,50 @@ endif () #------------------------------------------------- set_property(GLOBAL PROPERTY USE_FOLDERS ON) -file(GLOB_RECURSE BOOST_HTTP_IO_HEADERS CONFIGURE_DEPENDS include/boost/http_io/*.hpp include/boost/*.natvis) -file(GLOB_RECURSE BOOST_HTTP_IO_SOURCES CONFIGURE_DEPENDS src/*.cpp src/*.hpp) +file(GLOB_RECURSE BOOST_BEAST2_HEADERS CONFIGURE_DEPENDS include/boost/beast2/*.hpp include/boost/*.natvis) +file(GLOB_RECURSE BOOST_BEAST2_SOURCES CONFIGURE_DEPENDS src/*.cpp src/*.hpp) -source_group("" FILES "include/boost/http_io.hpp" "build/Jamfile") -source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/include/boost/http_io PREFIX "include" FILES ${BOOST_HTTP_IO_HEADERS}) -source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/src PREFIX "src" FILES ${BOOST_HTTP_IO_SOURCES}) +source_group("" FILES "include/boost/beast2.hpp" "build/Jamfile") +source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/include/boost/beast2 PREFIX "include" FILES ${BOOST_BEAST2_HEADERS}) +source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/src PREFIX "src" FILES ${BOOST_BEAST2_SOURCES}) -function(boost_http_io_setup_properties target) +function(boost_beast2_setup_properties target) target_compile_features(${target} PUBLIC cxx_constexpr) target_include_directories(${target} PUBLIC "${PROJECT_SOURCE_DIR}/include") - target_link_libraries(${target} PUBLIC ${BOOST_HTTP_IO_DEPENDENCIES}) + target_link_libraries(${target} PUBLIC ${BOOST_BEAST2_DEPENDENCIES}) find_package(Threads REQUIRED) target_link_libraries(${target} PUBLIC Threads::Threads) if (MINGW) target_link_libraries(${target} PUBLIC ws2_32 wsock32) endif() - target_compile_definitions(${target} PUBLIC BOOST_HTTP_IO_NO_LIB) - target_compile_definitions(${target} PRIVATE BOOST_HTTP_IO_SOURCE) + target_compile_definitions(${target} PUBLIC BOOST_BEAST2_NO_LIB) + target_compile_definitions(${target} PRIVATE BOOST_BEAST2_SOURCE) if (BUILD_SHARED_LIBS) - target_compile_definitions(${target} PUBLIC BOOST_HTTP_IO_DYN_LINK) + target_compile_definitions(${target} PUBLIC BOOST_BEAST2_DYN_LINK) else () - target_compile_definitions(${target} PUBLIC BOOST_HTTP_IO_STATIC_LINK) + target_compile_definitions(${target} PUBLIC BOOST_BEAST2_STATIC_LINK) endif () endfunction() -if (BOOST_HTTP_IO_MRDOCS_BUILD) - file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/mrdocs.cpp" "#include \n") - add_library(boost_http_io_mrdocs "${CMAKE_CURRENT_BINARY_DIR}/mrdocs.cpp") - boost_http_io_setup_properties(boost_http_io_mrdocs) - boost_http_io_setup_properties(boost_http_io_mrdocs PUBLIC BOOST_HTTP_IO_MRDOCS) +if (BOOST_BEAST2_MRDOCS_BUILD) + file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/mrdocs.cpp" "#include \n") + add_library(boost_beast2_mrdocs "${CMAKE_CURRENT_BINARY_DIR}/mrdocs.cpp") + boost_beast2_setup_properties(boost_beast2_mrdocs) + boost_beast2_setup_properties(boost_beast2_mrdocs PUBLIC BOOST_BEAST2_MRDOCS) return() endif() -add_library(boost_http_io include/boost/http_io.hpp build/Jamfile ${BOOST_HTTP_IO_HEADERS} ${BOOST_HTTP_IO_SOURCES}) -add_library(Boost::http_io ALIAS boost_http_io) -boost_http_io_setup_properties(boost_http_io) +add_library(boost_beast2 include/boost/beast2.hpp build/Jamfile ${BOOST_BEAST2_HEADERS} ${BOOST_BEAST2_SOURCES}) +add_library(Boost::beast2 ALIAS boost_beast2) +boost_beast2_setup_properties(boost_beast2) #------------------------------------------------- # # Tests # #------------------------------------------------- -if (BOOST_HTTP_IO_BUILD_TESTS) +if (BOOST_BEAST2_BUILD_TESTS) add_subdirectory(test) endif () @@ -184,6 +184,6 @@ endif () # Examples # #------------------------------------------------- -if (BOOST_HTTP_IO_BUILD_EXAMPLES) +if (BOOST_BEAST2_BUILD_EXAMPLES) add_subdirectory(example) endif () diff --git a/build/Jamfile b/build/Jamfile index 955d014..e439ad4 100644 --- a/build/Jamfile +++ b/build/Jamfile @@ -4,7 +4,7 @@ # 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/CPPAlliance/http_io +# Official repository: https://github.com/cppalliance/beast2 # import ../../config/checks/config : requires ; @@ -26,7 +26,7 @@ explicit [ searched-lib mswsock : : windows ] # NT ; -project boost/http_io +project boost/beast2 : common-requirements $(c11-requires) shared:BOOST_HTTP_IO_DYN_LINK=1 diff --git a/doc/antora.yml b/doc/antora.yml index ec1e8c5..e297afd 100644 --- a/doc/antora.yml +++ b/doc/antora.yml @@ -1,6 +1,6 @@ -name: http_io +name: beast2 version: ~ -title: Boost.Http.Io +title: Boost.Beast2 start_page: index.adoc asciidoc: attributes: diff --git a/doc/local-playbook.yml b/doc/local-playbook.yml index 9a910ad..85a095d 100644 --- a/doc/local-playbook.yml +++ b/doc/local-playbook.yml @@ -1,16 +1,16 @@ site: - title: Boost.Http.Io + title: Boost.Beast2 url: https://antora.cppalliance.org/develop/lib/doc - start_page: http_io::index.adoc + start_page: beast2::index.adoc robots: allow keys: - repo_url: 'https://github.com/cppalliance/http_io' + repo_url: 'https://github.com/cppalliance/beast2' content: sources: - url: .. start_path: doc - edit_url: 'https://github.com/cppalliance/http_io/edit/{refname}/{path}' + edit_url: 'https://github.com/cppalliance/beast2/edit/{refname}/{path}' ui: bundle: diff --git a/doc/modules/ROOT/nav.adoc b/doc/modules/ROOT/nav.adoc index c6de578..3e2aea0 100644 --- a/doc/modules/ROOT/nav.adoc +++ b/doc/modules/ROOT/nav.adoc @@ -1 +1 @@ -* xref:reference:boost/http_io.adoc[Reference] +* xref:reference:boost/beast2.adoc[Reference] diff --git a/doc/mrdocs.yml b/doc/mrdocs.yml index f842088..6a724c4 100644 --- a/doc/mrdocs.yml +++ b/doc/mrdocs.yml @@ -9,16 +9,16 @@ file-patterns: # Filters include-symbols: - - 'boost::http_io::**' + - 'boost::beast2::**' implementation-defined: - - 'boost::http_io::detail' - - 'boost::http_io::*::detail' + - 'boost::beast2::detail' + - 'boost::beast2::*::detail' inaccessible-members: never inaccessible-bases: never # Generator generate: adoc -base-url: https://www.github.com/cppalliance/http_io/blob/develop/ +base-url: https://www.github.com/cppalliance/beast2/blob/develop/ # Style verbose: true @@ -26,4 +26,4 @@ multipage: true use-system-libc: true use-system-stdlib: true -cmake: '-DCMAKE_CXX_STANDARD=20 -DBOOST_HTTP_IO_MRDOCS_BUILD=ON -DBOOST_HTTP_IO_BUILD_TESTS=OFF -DBOOST_HTTP_IO_BUILD_EXAMPLES=OFF' +cmake: '-DCMAKE_CXX_STANDARD=20 -DBOOST_BEAST2_MRDOCS_BUILD=ON -DBOOST_BEAST2_BUILD_TESTS=OFF -DBOOST_BEAST2_BUILD_EXAMPLES=OFF' diff --git a/example/client/get/CMakeLists.txt b/example/client/get/CMakeLists.txt index 77104fd..5ec1fdd 100644 --- a/example/client/get/CMakeLists.txt +++ b/example/client/get/CMakeLists.txt @@ -4,7 +4,7 @@ # 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/cppalliance/http_io +# Official repository: https://github.com/cppalliance/beast2 # file(GLOB_RECURSE PFILES CONFIGURE_DEPENDS *.cpp *.hpp @@ -13,30 +13,30 @@ file(GLOB_RECURSE PFILES CONFIGURE_DEPENDS *.cpp *.hpp source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX "" FILES ${PFILES}) -add_executable(http_io_example_client_get ${PFILES}) +add_executable(beast2_example_client_get ${PFILES}) -target_compile_definitions(http_io_example_client_get +target_compile_definitions(beast2_example_client_get PRIVATE BOOST_ASIO_NO_DEPRECATED) -set_property(TARGET http_io_example_client_get +set_property(TARGET beast2_example_client_get PROPERTY FOLDER "examples") find_package(OpenSSL REQUIRED) -target_link_libraries(http_io_example_client_get - Boost::http_io +target_link_libraries(beast2_example_client_get + Boost::beast2 Boost::url OpenSSL::SSL OpenSSL::Crypto) if (WIN32) - target_link_libraries(http_io_example_client_get crypt32) + target_link_libraries(beast2_example_client_get crypt32) endif() if (TARGET Boost::rts_zlib) - target_link_libraries(http_io_example_client_get Boost::rts_zlib) + target_link_libraries(beast2_example_client_get Boost::rts_zlib) endif() if (TARGET Boost::rts_brotli) - target_link_libraries(http_io_example_client_get Boost::rts_brotli) + target_link_libraries(beast2_example_client_get Boost::rts_brotli) endif() diff --git a/example/client/get/Jamfile b/example/client/get/Jamfile index 9c3d389..c7fe768 100644 --- a/example/client/get/Jamfile +++ b/example/client/get/Jamfile @@ -4,7 +4,7 @@ # 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/cppalliance/http_io +# Official repository: https://github.com/cppalliance/beast2 # using openssl ; @@ -17,7 +17,7 @@ lib user32 ; project : requirements - /boost/http_io//boost_http_io + /boost/beast2//boost_beast2 [ ac.check-library /boost/rts//boost_rts_zlib : /boost/rts//boost_rts_zlib : ] [ ac.check-library /boost/rts//boost_rts_brotli : /boost/rts//boost_rts_brotli : ] [ ac.check-library /openssl//ssl : /openssl//ssl/shared : no ] diff --git a/example/client/get/main.cpp b/example/client/get/main.cpp index d89761d..6f9dd9e 100644 --- a/example/client/get/main.cpp +++ b/example/client/get/main.cpp @@ -4,7 +4,7 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // #include @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include #include @@ -181,12 +181,12 @@ class session // Send the HTTP request to the remote host if(secure_) - http_io::async_write( + beast2::async_write( stream_, sr_, std::bind(&session::on_write, this, _1, _2)); else - http_io::async_write( + beast2::async_write( stream_.next_layer(), sr_, std::bind(&session::on_write, this, _1, _2)); @@ -208,12 +208,12 @@ class session // Receive the HTTP response header if(secure_) - http_io::async_read_header( + beast2::async_read_header( stream_, pr_, std::bind(&session::on_read_header, this, _1, _2)); else - http_io::async_read_header( + beast2::async_read_header( stream_.next_layer(), pr_, std::bind(&session::on_read_header, this, _1, _2)); @@ -238,12 +238,12 @@ class session // Receive the HTTP response body if(secure_) - http_io::async_read( + beast2::async_read( stream_, pr_, std::bind(&session::on_read, this, _1, _2)); else - http_io::async_read( + beast2::async_read( stream_.next_layer(), pr_, std::bind(&session::on_read, this, _1, _2)); @@ -288,7 +288,7 @@ class session // Read and discard bodies if they are <= 32KB // Open a new connection otherwise. pr_.set_body_limit(32 * 1024); - return http_io::async_read( + return beast2::async_read( stream_, pr_, [this](system::error_code ec, std::size_t) diff --git a/example/client/jsonrpc/CMakeLists.txt b/example/client/jsonrpc/CMakeLists.txt index e15cf7a..29a01f6 100644 --- a/example/client/jsonrpc/CMakeLists.txt +++ b/example/client/jsonrpc/CMakeLists.txt @@ -4,7 +4,7 @@ # 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/cppalliance/http_io +# Official repository: https://github.com/cppalliance/beast2 # file(GLOB_RECURSE PFILES CONFIGURE_DEPENDS *.cpp *.hpp @@ -14,19 +14,19 @@ file(GLOB_RECURSE PFILES CONFIGURE_DEPENDS *.cpp *.hpp source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX "" FILES ${PFILES}) file(GLOB_RECURSE LIBFILES CONFIGURE_DEPENDS jsonrpc/*.cpp jsonrpc/*.hpp Jamfile) -add_library(http_io_example_client_jsonrpc_lib STATIC ${LIBFILES}) +add_library(beast2_example_client_jsonrpc_lib STATIC ${LIBFILES}) -target_compile_definitions(http_io_example_client_jsonrpc_lib +target_compile_definitions(beast2_example_client_jsonrpc_lib PUBLIC BOOST_ASIO_NO_DEPRECATED) -set_property(TARGET http_io_example_client_jsonrpc_lib +set_property(TARGET beast2_example_client_jsonrpc_lib PROPERTY FOLDER "examples") find_package(OpenSSL REQUIRED) -target_link_libraries(http_io_example_client_jsonrpc_lib +target_link_libraries(beast2_example_client_jsonrpc_lib PUBLIC - Boost::http_io + Boost::beast2 Boost::url Boost::json Boost::multiprecision @@ -34,35 +34,35 @@ target_link_libraries(http_io_example_client_jsonrpc_lib OpenSSL::Crypto) if (WIN32) - target_link_libraries(http_io_example_client_jsonrpc_lib PUBLIC crypt32) + target_link_libraries(beast2_example_client_jsonrpc_lib PUBLIC crypt32) endif() # CPP11 Example -add_executable(http_io_example_client_jsonrpc_cpp11 cpp11.cpp eth_methods.hpp Jamfile) -set_property(TARGET http_io_example_client_jsonrpc_cpp11 +add_executable(beast2_example_client_jsonrpc_cpp11 cpp11.cpp eth_methods.hpp Jamfile) +set_property(TARGET beast2_example_client_jsonrpc_cpp11 PROPERTY FOLDER "examples") -target_link_libraries(http_io_example_client_jsonrpc_cpp11 +target_link_libraries(beast2_example_client_jsonrpc_cpp11 PRIVATE - http_io_example_client_jsonrpc_lib) + beast2_example_client_jsonrpc_lib) if (TARGET Boost::rts_zlib) - target_link_libraries(http_io_example_client_jsonrpc_cpp11 PRIVATE Boost::rts_zlib) + target_link_libraries(beast2_example_client_jsonrpc_cpp11 PRIVATE Boost::rts_zlib) endif() if (TARGET Boost::rts_brotli) - target_link_libraries(http_io_example_client_jsonrpc_cpp11 PRIVATE Boost::rts_brotli) + target_link_libraries(beast2_example_client_jsonrpc_cpp11 PRIVATE Boost::rts_brotli) endif() # CPP20 Example if (CMAKE_CXX_STANDARD EQUAL 20) - add_executable(http_io_example_client_jsonrpc_cpp20 cpp20.cpp eth_methods.hpp Jamfile) - set_property(TARGET http_io_example_client_jsonrpc_cpp20 + add_executable(beast2_example_client_jsonrpc_cpp20 cpp20.cpp eth_methods.hpp Jamfile) + set_property(TARGET beast2_example_client_jsonrpc_cpp20 PROPERTY FOLDER "examples") - target_link_libraries(http_io_example_client_jsonrpc_cpp20 + target_link_libraries(beast2_example_client_jsonrpc_cpp20 PRIVATE - http_io_example_client_jsonrpc_lib) + beast2_example_client_jsonrpc_lib) if (TARGET Boost::rts_zlib) - target_link_libraries(http_io_example_client_jsonrpc_cpp20 PRIVATE Boost::rts_zlib) + target_link_libraries(beast2_example_client_jsonrpc_cpp20 PRIVATE Boost::rts_zlib) endif() if (TARGET Boost::rts_brotli) - target_link_libraries(http_io_example_client_jsonrpc_cpp20 PRIVATE Boost::rts_brotli) + target_link_libraries(beast2_example_client_jsonrpc_cpp20 PRIVATE Boost::rts_brotli) endif() endif () diff --git a/example/client/jsonrpc/Jamfile b/example/client/jsonrpc/Jamfile index e245943..adb07a3 100644 --- a/example/client/jsonrpc/Jamfile +++ b/example/client/jsonrpc/Jamfile @@ -4,7 +4,7 @@ # 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/cppalliance/http_io +# Official repository: https://github.com/cppalliance/beast2 # import ../../../../config/checks/config : requires ; @@ -19,7 +19,7 @@ lib user32 ; project : requirements - /boost/http_io//boost_http_io + /boost/beast2//boost_beast2 [ ac.check-library /boost/rts//boost_rts_zlib : /boost/rts//boost_rts_zlib : ] [ ac.check-library /boost/rts//boost_rts_brotli : /boost/rts//boost_rts_brotli : ] [ ac.check-library /openssl//ssl : /openssl//ssl/shared : no ] diff --git a/example/client/jsonrpc/cpp11.cpp b/example/client/jsonrpc/cpp11.cpp index 3290b4f..1a05d0c 100644 --- a/example/client/jsonrpc/cpp11.cpp +++ b/example/client/jsonrpc/cpp11.cpp @@ -4,7 +4,7 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // #include "jsonrpc/client.hpp" diff --git a/example/client/jsonrpc/eth_methods.hpp b/example/client/jsonrpc/eth_methods.hpp index d812268..4e07208 100644 --- a/example/client/jsonrpc/eth_methods.hpp +++ b/example/client/jsonrpc/eth_methods.hpp @@ -4,11 +4,11 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // -#ifndef BOOST_HTTP_IO_EXAMPLE_CLIENT_JSONRPC_METHODS_HPP -#define BOOST_HTTP_IO_EXAMPLE_CLIENT_JSONRPC_METHODS_HPP +#ifndef BOOST_BEAST2_EXAMPLE_CLIENT_JSONRPC_METHODS_HPP +#define BOOST_BEAST2_EXAMPLE_CLIENT_JSONRPC_METHODS_HPP #include "jsonrpc/method.hpp" diff --git a/example/client/jsonrpc/jsonrpc/any_stream.hpp b/example/client/jsonrpc/jsonrpc/any_stream.hpp index bdca05a..4efecf6 100644 --- a/example/client/jsonrpc/jsonrpc/any_stream.hpp +++ b/example/client/jsonrpc/jsonrpc/any_stream.hpp @@ -4,7 +4,7 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // #ifndef JSONRPC_ANY_STREAM_HPP diff --git a/example/client/jsonrpc/jsonrpc/client.cpp b/example/client/jsonrpc/jsonrpc/client.cpp index 4edfd1e..0129513 100644 --- a/example/client/jsonrpc/jsonrpc/client.cpp +++ b/example/client/jsonrpc/jsonrpc/client.cpp @@ -4,7 +4,7 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // #include "client.hpp" @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include #include @@ -314,7 +314,7 @@ class client::request_op client_.sr_.start( client_.req_, client_.jsr_, std::move(value)); - http_io::async_write( + beast2::async_write( *client_.stream_, client_.sr_, std::move(self)); } @@ -332,12 +332,12 @@ class client::request_op { client_.pr_.start(); BOOST_ASIO_CORO_YIELD - http_io::async_read_header( + beast2::async_read_header( *client_.stream_, client_.pr_, std::move(self)); client_.pr_.set_body(client_.jpr_); BOOST_ASIO_CORO_YIELD - http_io::async_read( + beast2::async_read( *client_.stream_, client_.pr_, std::move(self)); { diff --git a/example/client/jsonrpc/jsonrpc/client.hpp b/example/client/jsonrpc/jsonrpc/client.hpp index 585d371..8f81458 100644 --- a/example/client/jsonrpc/jsonrpc/client.hpp +++ b/example/client/jsonrpc/jsonrpc/client.hpp @@ -4,7 +4,7 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // #ifndef JSONRPC_CLIENT_HPP diff --git a/example/client/jsonrpc/jsonrpc/detail/converts_to.hpp b/example/client/jsonrpc/jsonrpc/detail/converts_to.hpp index 4520c3d..519fe4c 100644 --- a/example/client/jsonrpc/jsonrpc/detail/converts_to.hpp +++ b/example/client/jsonrpc/jsonrpc/detail/converts_to.hpp @@ -4,7 +4,7 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // #ifndef JSONRPC_DETAIL_CONVERTS_TO_HPP diff --git a/example/client/jsonrpc/jsonrpc/detail/initiation_base.hpp b/example/client/jsonrpc/jsonrpc/detail/initiation_base.hpp index 27fb91b..dac43ac 100644 --- a/example/client/jsonrpc/jsonrpc/detail/initiation_base.hpp +++ b/example/client/jsonrpc/jsonrpc/detail/initiation_base.hpp @@ -4,7 +4,7 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // #ifndef JSONRPC_DETAIL_INITIATION_BASE_HPP diff --git a/example/client/jsonrpc/jsonrpc/errc.cpp b/example/client/jsonrpc/jsonrpc/errc.cpp index 0581a73..b935a8f 100644 --- a/example/client/jsonrpc/jsonrpc/errc.cpp +++ b/example/client/jsonrpc/jsonrpc/errc.cpp @@ -4,7 +4,7 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // #include "errc.hpp" diff --git a/example/client/jsonrpc/jsonrpc/errc.hpp b/example/client/jsonrpc/jsonrpc/errc.hpp index da6120f..6e1d2e1 100644 --- a/example/client/jsonrpc/jsonrpc/errc.hpp +++ b/example/client/jsonrpc/jsonrpc/errc.hpp @@ -4,7 +4,7 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // #ifndef JSONRPC_ERRC_HPP diff --git a/example/client/jsonrpc/jsonrpc/error.hpp b/example/client/jsonrpc/jsonrpc/error.hpp index 97618a5..583b81a 100644 --- a/example/client/jsonrpc/jsonrpc/error.hpp +++ b/example/client/jsonrpc/jsonrpc/error.hpp @@ -4,7 +4,7 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // #ifndef JSONRPC_ERROR_HPP diff --git a/example/client/jsonrpc/jsonrpc/method.hpp b/example/client/jsonrpc/jsonrpc/method.hpp index 893c93e..9f04064 100644 --- a/example/client/jsonrpc/jsonrpc/method.hpp +++ b/example/client/jsonrpc/jsonrpc/method.hpp @@ -4,7 +4,7 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // #ifndef JSONRPC_METHOD_HPP diff --git a/example/client/visit/CMakeLists.txt b/example/client/visit/CMakeLists.txt index baf057f..83f4ccb 100644 --- a/example/client/visit/CMakeLists.txt +++ b/example/client/visit/CMakeLists.txt @@ -4,7 +4,7 @@ # 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/cppalliance/http_io +# Official repository: https://github.com/cppalliance/beast2 # file(GLOB_RECURSE PFILES CONFIGURE_DEPENDS *.cpp *.hpp @@ -13,15 +13,15 @@ file(GLOB_RECURSE PFILES CONFIGURE_DEPENDS *.cpp *.hpp source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX "" FILES ${PFILES}) -add_executable(http_io_example_client_visit ${PFILES}) +add_executable(beast2_example_client_visit ${PFILES}) -target_compile_definitions(http_io_example_client_visit +target_compile_definitions(beast2_example_client_visit PRIVATE BOOST_ASIO_NO_DEPRECATED) -set_property(TARGET http_io_example_client_visit +set_property(TARGET beast2_example_client_visit PROPERTY FOLDER "examples") -target_link_libraries(http_io_example_client_visit - Boost::http_io +target_link_libraries(beast2_example_client_visit + Boost::beast2 Boost::url) diff --git a/example/client/visit/Jamfile b/example/client/visit/Jamfile index d10b762..e2ed941 100644 --- a/example/client/visit/Jamfile +++ b/example/client/visit/Jamfile @@ -5,12 +5,12 @@ # 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/cppalliance/http_io +# Official repository: https://github.com/cppalliance/beast2 # project : requirements - /boost/http_io//boost_http_io + /boost/beast2//boost_beast2 /boost/url//boost_url . BOOST_ASIO_NO_DEPRECATED diff --git a/example/client/visit/main.cpp b/example/client/visit/main.cpp index ec59118..4042109 100644 --- a/example/client/visit/main.cpp +++ b/example/client/visit/main.cpp @@ -4,7 +4,7 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // #include diff --git a/example/server/CMakeLists.txt b/example/server/CMakeLists.txt index 1ccb2c4..5a033ac 100644 --- a/example/server/CMakeLists.txt +++ b/example/server/CMakeLists.txt @@ -4,7 +4,7 @@ # 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/cppalliance/http_io +# Official repository: https://github.com/cppalliance/beast2 # file(GLOB_RECURSE PFILES CONFIGURE_DEPENDS *.cpp *.hpp @@ -13,33 +13,33 @@ file(GLOB_RECURSE PFILES CONFIGURE_DEPENDS *.cpp *.hpp source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX "" FILES ${PFILES}) -add_executable(http_io_server_example ${PFILES}) +add_executable(beast2_server_example ${PFILES}) -target_compile_definitions(http_io_server_example +target_compile_definitions(beast2_server_example PRIVATE BOOST_ASIO_NO_DEPRECATED) -set_property(TARGET http_io_server_example +set_property(TARGET beast2_server_example PROPERTY FOLDER "examples") find_package(OpenSSL REQUIRED) -target_include_directories(http_io_server_example PRIVATE .) +target_include_directories(beast2_server_example PRIVATE .) target_link_libraries( - http_io_server_example - Boost::http_io + beast2_server_example + Boost::beast2 Boost::url OpenSSL::SSL OpenSSL::Crypto ) if (WIN32) - target_link_libraries(http_io_server_example crypt32) + target_link_libraries(beast2_server_example crypt32) endif() if (TARGET Boost::rts_zlib) - target_link_libraries(http_io_server_example Boost::rts_zlib) + target_link_libraries(beast2_server_example Boost::rts_zlib) endif() if (TARGET Boost::rts_brotli) - target_link_libraries(http_io_server_example Boost::rts_brotli) + target_link_libraries(beast2_server_example Boost::rts_brotli) endif() diff --git a/example/server/Jamfile b/example/server/Jamfile index 0a399ac..a821bf0 100644 --- a/example/server/Jamfile +++ b/example/server/Jamfile @@ -18,7 +18,7 @@ lib user32 ; project : requirements - /boost/http_io//boost_http_io + /boost/beast2//boost_beast2 /boost/url//boost_url [ ac.check-library /boost/rts//boost_rts_zlib : /boost/rts//boost_rts_zlib : ] [ ac.check-library /boost/rts//boost_rts_brotli : /boost/rts//boost_rts_brotli : ] diff --git a/example/server/asio_params.hpp b/example/server/asio_params.hpp index e5ba43c..928d88b 100644 --- a/example/server/asio_params.hpp +++ b/example/server/asio_params.hpp @@ -4,18 +4,18 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // -#ifndef BOOST_HTTP_IO_EXAMPLE_SERVER_ASIO_PARAMS_HPP -#define BOOST_HTTP_IO_EXAMPLE_SERVER_ASIO_PARAMS_HPP +#ifndef BOOST_BEAST2_EXAMPLE_SERVER_ASIO_PARAMS_HPP +#define BOOST_BEAST2_EXAMPLE_SERVER_ASIO_PARAMS_HPP -#include +#include namespace boost { -namespace http_io { +namespace beast2 { -} // http_io +} // beast2 } // boost #endif diff --git a/example/server/certificate.cpp b/example/server/certificate.cpp index f6fee15..1e3e4dd 100644 --- a/example/server/certificate.cpp +++ b/example/server/certificate.cpp @@ -4,7 +4,7 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // #include "certificate.hpp" @@ -12,7 +12,7 @@ #include namespace boost { -namespace http_io { +namespace beast2 { void load_server_certificate( @@ -134,5 +134,5 @@ load_server_certificate( ctx.use_tmp_dh(asio::buffer(dh)); } -} // http_io +} // beast2 } // boost diff --git a/example/server/certificate.hpp b/example/server/certificate.hpp index 894842e..5bb4f7c 100644 --- a/example/server/certificate.hpp +++ b/example/server/certificate.hpp @@ -4,11 +4,11 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // -#ifndef BOOST_HTTP_IO_EXAMPLE_SERVER_CERTIFICATE_HPP -#define BOOST_HTTP_IO_EXAMPLE_SERVER_CERTIFICATE_HPP +#ifndef BOOST_BEAST2_EXAMPLE_SERVER_CERTIFICATE_HPP +#define BOOST_BEAST2_EXAMPLE_SERVER_CERTIFICATE_HPP #include #include @@ -16,7 +16,7 @@ #include namespace boost { -namespace http_io { +namespace beast2 { /* Load a signed certificate into the ssl context, and configure the context for use with a server. @@ -30,7 +30,7 @@ void load_server_certificate( asio::ssl::context& ctx); -} // http_io +} // beast2 } // boost #endif diff --git a/example/server/handler.cpp b/example/server/handler.cpp index 499ea3a..2317f4f 100644 --- a/example/server/handler.cpp +++ b/example/server/handler.cpp @@ -4,7 +4,7 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // #include "handler.hpp" @@ -22,7 +22,7 @@ #include namespace boost { -namespace http_io { +namespace beast2 { //------------------------------------------------ @@ -395,6 +395,6 @@ operator()( return false; } -} // http_io +} // beast2 } // boost diff --git a/example/server/handler.hpp b/example/server/handler.hpp index 15d4fd8..2251dc9 100644 --- a/example/server/handler.hpp +++ b/example/server/handler.hpp @@ -4,22 +4,22 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // -#ifndef BOOST_HTTP_IO_EXAMPLE_SERVER_HANDLER_HPP -#define BOOST_HTTP_IO_EXAMPLE_SERVER_HANDLER_HPP +#ifndef BOOST_BEAST2_EXAMPLE_SERVER_HANDLER_HPP +#define BOOST_BEAST2_EXAMPLE_SERVER_HANDLER_HPP -#include -#include -#include +#include +#include +#include #include #include #include #include namespace boost { -namespace http_io { +namespace beast2 { using router_type = router; @@ -46,7 +46,7 @@ struct file_responder std::string doc_root_; }; -} // http_io +} // beast2 } // boost #endif diff --git a/example/server/http_responder.hpp b/example/server/http_responder.hpp index 217f7bf..9ee2c58 100644 --- a/example/server/http_responder.hpp +++ b/example/server/http_responder.hpp @@ -4,26 +4,26 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // -#ifndef BOOST_HTTP_IO_EXAMPLE_SERVER_HTTP_RESPONDER_HPP -#define BOOST_HTTP_IO_EXAMPLE_SERVER_HTTP_RESPONDER_HPP +#ifndef BOOST_BEAST2_EXAMPLE_SERVER_HTTP_RESPONDER_HPP +#define BOOST_BEAST2_EXAMPLE_SERVER_HTTP_RESPONDER_HPP #include "handler.hpp" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include #include namespace boost { -namespace http_io { +namespace beast2 { //------------------------------------------------ @@ -67,7 +67,7 @@ class http_responder void do_read() { pr_.start(); - http_io::async_read(self().stream(), pr_, + beast2::async_read(self().stream(), pr_, call_mf(&http_responder::on_read, this)); } @@ -104,7 +104,7 @@ class http_responder auto cont = rr_(req, res); BOOST_ASSERT(! cont); - http_io::async_write(self().stream(), sr_, + beast2::async_write(self().stream(), sr_, call_mf(&http_responder::on_write, this)); } @@ -173,7 +173,7 @@ class http_responder acceptor_config const* pconfig_ = nullptr; }; -} // http_io +} // beast2 } // boost #endif diff --git a/example/server/main.cpp b/example/server/main.cpp index 20c2b08..7322ff6 100644 --- a/example/server/main.cpp +++ b/example/server/main.cpp @@ -4,13 +4,13 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // #include "certificate.hpp" #include "worker_ssl.hpp" -#include -#include +#include +#include #include #include #include @@ -23,7 +23,7 @@ #include namespace boost { -namespace http_io { +namespace beast2 { int server_main( int argc, char* argv[] ) { @@ -141,10 +141,10 @@ int server_main( int argc, char* argv[] ) return EXIT_SUCCESS; } -} // http_io +} // beast2 } // boost int main(int argc, char* argv[]) { - return boost::http_io::server_main( argc, argv ); + return boost::beast2::server_main( argc, argv ); } diff --git a/example/server/worker_ssl.hpp b/example/server/worker_ssl.hpp index bba5582..810eeee 100644 --- a/example/server/worker_ssl.hpp +++ b/example/server/worker_ssl.hpp @@ -4,21 +4,21 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // -#ifndef BOOST_HTTP_IO_EXAMPLE_SERVER_WORKER_SSL_HPP -#define BOOST_HTTP_IO_EXAMPLE_SERVER_WORKER_SSL_HPP +#ifndef BOOST_BEAST2_EXAMPLE_SERVER_WORKER_SSL_HPP +#define BOOST_BEAST2_EXAMPLE_SERVER_WORKER_SSL_HPP #include "handler.hpp" #include "http_responder.hpp" -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -33,7 +33,7 @@ class tcp; // forward declaration } // ip } // asio -namespace http_io { +namespace beast2 { template< class Executor, @@ -49,7 +49,7 @@ class worker_ssl : public http_responder< asio::basic_stream_socket; using stream_type = ssl_stream; - using acceptor_config = http_io::acceptor_config; + using acceptor_config = beast2::acceptor_config; template< class Executor0, @@ -67,7 +67,7 @@ class worker_ssl : public http_responder< { } - http_io::server& server() noexcept + beast2::server& server() noexcept { return wb_.server(); } @@ -204,7 +204,7 @@ class worker_ssl : public http_responder< typename Protocol::endpoint ep_; }; -} // http_io +} // beast2 } // boost #endif diff --git a/include/boost/http_io.hpp b/include/boost/beast2.hpp similarity index 56% rename from include/boost/http_io.hpp rename to include/boost/beast2.hpp index 8c16c3b..3f99864 100644 --- a/include/boost/http_io.hpp +++ b/include/boost/beast2.hpp @@ -4,13 +4,13 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // -#ifndef BOOST_HTTP_IO_HPP -#define BOOST_HTTP_IO_HPP +#ifndef BOOST_BEAST2_HPP +#define BOOST_BEAST2_HPP -#include -#include +#include +#include #endif diff --git a/include/boost/http_io/buffer.hpp b/include/boost/beast2/buffer.hpp similarity index 65% rename from include/boost/http_io/buffer.hpp rename to include/boost/beast2/buffer.hpp index ca7d514..9f9b873 100644 --- a/include/boost/http_io/buffer.hpp +++ b/include/boost/beast2/buffer.hpp @@ -4,22 +4,22 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // -#ifndef BOOST_HTTP_IO_BUFFER_HPP -#define BOOST_HTTP_IO_BUFFER_HPP +#ifndef BOOST_BEAST2_BUFFER_HPP +#define BOOST_BEAST2_BUFFER_HPP -#include +#include #include #include #include #include namespace boost { -namespace http_io { +namespace beast2 { -} // http_io +} // beast2 } // boost #endif diff --git a/include/boost/http_io/client.hpp b/include/boost/beast2/client.hpp similarity index 86% rename from include/boost/http_io/client.hpp rename to include/boost/beast2/client.hpp index 27bdef1..1098473 100644 --- a/include/boost/http_io/client.hpp +++ b/include/boost/beast2/client.hpp @@ -4,18 +4,18 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // -#ifndef BOOST_HTTP_IO_CLIENT_HPP -#define BOOST_HTTP_IO_CLIENT_HPP +#ifndef BOOST_BEAST2_CLIENT_HPP +#define BOOST_BEAST2_CLIENT_HPP -#include +#include #include #include namespace boost { -namespace http_io { +namespace beast2 { template< class AsyncStream @@ -67,7 +67,7 @@ class client AsyncStream stream_; }; -} // http_io +} // beast2 } // boost #endif diff --git a/include/boost/beast2/detail/config.hpp b/include/boost/beast2/detail/config.hpp new file mode 100644 index 0000000..405f49c --- /dev/null +++ b/include/boost/beast2/detail/config.hpp @@ -0,0 +1,58 @@ +// +// Copyright (c) 2019 Vinnie Falco (vinnie.falco@gmail.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/cppalliance/beast2 +// + +#ifndef BOOST_BEAST2_DETAIL_CONFIG_HPP +#define BOOST_BEAST2_DETAIL_CONFIG_HPP + +#include + +namespace boost { +namespace beast2 { + +# if (defined(BOOST_BEAST2_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)) && !defined(BOOST_BEAST2_STATIC_LINK) +# if defined(BOOST_BEAST2_SOURCE) +# define BOOST_BEAST2_DECL BOOST_SYMBOL_EXPORT +# define BOOST_BEAST2_CLASS_DECL BOOST_SYMBOL_EXPORT +# define BOOST_BEAST2_BUILD_DLL +# else +# define BOOST_BEAST2_DECL BOOST_SYMBOL_IMPORT +# define BOOST_BEAST2_CLASS_DECL BOOST_SYMBOL_IMPORT +# endif +# endif // shared lib +# ifndef BOOST_BEAST2_DECL +# define BOOST_BEAST2_DECL +# endif +# if !defined(BOOST_BEAST2_SOURCE) && !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_BEAST2_NO_LIB) +# define BOOST_LIB_NAME boost_json +# if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_BEAST2_DYN_LINK) +# define BOOST_DYN_LINK +# endif +# include +# endif + +// Add source location to error codes +#ifdef BOOST_BEAST2_NO_SOURCE_LOCATION +# define BOOST_BEAST2_ERR(ev) (::boost::system::error_code(ev)) +# define BOOST_BEAST2_RETURN_EC(ev) return (ev) +#else +# define BOOST_BEAST2_ERR(ev) ( \ + ::boost::system::error_code( (ev), [] { \ + static constexpr auto loc((BOOST_CURRENT_LOCATION)); \ + return &loc; }())) +# define BOOST_BEAST2_RETURN_EC(ev) \ + do { \ + static constexpr auto loc ## __LINE__((BOOST_CURRENT_LOCATION)); \ + return ::boost::system::error_code((ev), &loc ## __LINE__); \ + } while(0) +#endif + +} // beast2 +} // boost + +#endif diff --git a/include/boost/http_io/detail/except.hpp b/include/boost/beast2/detail/except.hpp similarity index 57% rename from include/boost/http_io/detail/except.hpp rename to include/boost/beast2/detail/except.hpp index ff8884d..969aa3a 100644 --- a/include/boost/http_io/detail/except.hpp +++ b/include/boost/beast2/detail/except.hpp @@ -4,27 +4,27 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // -#ifndef BOOST_HTTP_IO_DETAIL_EXCEPT_HPP -#define BOOST_HTTP_IO_DETAIL_EXCEPT_HPP +#ifndef BOOST_BEAST2_DETAIL_EXCEPT_HPP +#define BOOST_BEAST2_DETAIL_EXCEPT_HPP #include -#include +#include namespace boost { -namespace http_io { +namespace beast2 { namespace detail { -BOOST_HTTP_IO_DECL void BOOST_NORETURN throw_logic_error( +BOOST_BEAST2_DECL void BOOST_NORETURN throw_logic_error( source_location const& loc = BOOST_CURRENT_LOCATION); -BOOST_HTTP_IO_DECL void BOOST_NORETURN throw_invalid_argument( +BOOST_BEAST2_DECL void BOOST_NORETURN throw_invalid_argument( source_location const& loc = BOOST_CURRENT_LOCATION); } // detail -} // http_io +} // beast2 } // boost #endif diff --git a/include/boost/http_io/detail/type_traits.hpp b/include/boost/beast2/detail/type_traits.hpp similarity index 75% rename from include/boost/http_io/detail/type_traits.hpp rename to include/boost/beast2/detail/type_traits.hpp index e6d5dbc..7c4147f 100644 --- a/include/boost/http_io/detail/type_traits.hpp +++ b/include/boost/beast2/detail/type_traits.hpp @@ -4,16 +4,16 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // -#ifndef BOOST_HTTP_IO_DETAIL_CONFIG_HPP -#define BOOST_HTTP_IO_DETAIL_CONFIG_HPP +#ifndef BOOST_BEAST2_DETAIL_CONFIG_HPP +#define BOOST_BEAST2_DETAIL_CONFIG_HPP #include namespace boost { -namespace http_io { +namespace beast2 { namespace detail { template @@ -24,7 +24,7 @@ using derived_from = std::integral_constant::value>; } // detail -} // http_io +} // beast2 } // boost #endif diff --git a/include/boost/http_io/endpoint.hpp b/include/boost/beast2/endpoint.hpp similarity index 85% rename from include/boost/http_io/endpoint.hpp rename to include/boost/beast2/endpoint.hpp index 6551a3e..ab63bbe 100644 --- a/include/boost/http_io/endpoint.hpp +++ b/include/boost/beast2/endpoint.hpp @@ -4,20 +4,20 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // -#ifndef BOOST_HTTP_IO_ENDPOINT_HPP -#define BOOST_HTTP_IO_ENDPOINT_HPP +#ifndef BOOST_BEAST2_ENDPOINT_HPP +#define BOOST_BEAST2_ENDPOINT_HPP -#include +#include #include #include #include #include namespace boost { -namespace http_io { +namespace beast2 { /** Represents a host and port @@ -29,26 +29,26 @@ namespace http_io { class endpoint { public: - BOOST_HTTP_IO_DECL + BOOST_BEAST2_DECL ~endpoint(); endpoint() = default; - BOOST_HTTP_IO_DECL + BOOST_BEAST2_DECL endpoint( endpoint const& other) noexcept; - BOOST_HTTP_IO_DECL + BOOST_BEAST2_DECL endpoint( urls::ipv4_address const& addr, unsigned short port) noexcept; - BOOST_HTTP_IO_DECL + BOOST_BEAST2_DECL endpoint( urls::ipv6_address const& addr, unsigned short port) noexcept; - BOOST_HTTP_IO_DECL + BOOST_BEAST2_DECL endpoint& operator=(endpoint const&) noexcept; unsigned short @@ -98,7 +98,7 @@ class endpoint } private: - BOOST_HTTP_IO_DECL + BOOST_BEAST2_DECL void format(std::ostream&) const; urls::host_type kind_ = urls::host_type::none; @@ -111,7 +111,7 @@ class endpoint }; -} // http_io +} // beast2 } // boost #endif diff --git a/include/boost/http_io/impl/read.hpp b/include/boost/beast2/impl/read.hpp similarity index 95% rename from include/boost/http_io/impl/read.hpp rename to include/boost/beast2/impl/read.hpp index 4c04cb9..403a430 100644 --- a/include/boost/http_io/impl/read.hpp +++ b/include/boost/beast2/impl/read.hpp @@ -4,13 +4,13 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // -#ifndef BOOST_HTTP_IO_IMPL_READ_HPP -#define BOOST_HTTP_IO_IMPL_READ_HPP +#ifndef BOOST_BEAST2_IMPL_READ_HPP +#define BOOST_BEAST2_IMPL_READ_HPP -#include +#include #include #include #include @@ -20,7 +20,7 @@ #include namespace boost { -namespace http_io { +namespace beast2 { namespace detail { @@ -185,7 +185,7 @@ async_read( s); } -} // http_io +} // beast2 } // boost #endif diff --git a/include/boost/http_io/impl/write.hpp b/include/boost/beast2/impl/write.hpp similarity index 95% rename from include/boost/http_io/impl/write.hpp rename to include/boost/beast2/impl/write.hpp index ce31616..7eb10f1 100644 --- a/include/boost/http_io/impl/write.hpp +++ b/include/boost/beast2/impl/write.hpp @@ -4,11 +4,11 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // -#ifndef BOOST_HTTP_IO_IMPL_WRITE_HPP -#define BOOST_HTTP_IO_IMPL_WRITE_HPP +#ifndef BOOST_BEAST2_IMPL_WRITE_HPP +#define BOOST_BEAST2_IMPL_WRITE_HPP #include #include @@ -20,7 +20,7 @@ #include namespace boost { -namespace http_io { +namespace beast2 { namespace detail { @@ -75,7 +75,7 @@ class write_some_op { BOOST_ASIO_HANDLER_LOCATION(( __FILE__, __LINE__, - "http_io::write_some_op")); + "beast2::write_some_op")); dest_.async_write_some( *rv, std::move(self)); @@ -123,7 +123,7 @@ class write_op { BOOST_ASIO_HANDLER_LOCATION(( __FILE__, __LINE__, - "http_io::write_op")); + "beast2::write_op")); async_write_some( dest_, sr_, std::move(self)); } @@ -191,7 +191,7 @@ class relay_some_op { BOOST_ASIO_HANDLER_LOCATION(( __FILE__, __LINE__, - "http_io::relay_some_op")); + "beast2::relay_some_op")); asio::post(std::move(self)); } goto upcall; @@ -201,7 +201,7 @@ class relay_some_op { BOOST_ASIO_HANDLER_LOCATION(( __FILE__, __LINE__, - "http_io::relay_some_op")); + "beast2::relay_some_op")); dest_.async_write_some( write_buffers(*rv), std::move(self)); @@ -289,7 +289,7 @@ async_relay_some( } #endif -} // http_io +} // beast2 } // boost #endif diff --git a/include/boost/http_io/read.hpp b/include/boost/beast2/read.hpp similarity index 97% rename from include/boost/http_io/read.hpp rename to include/boost/beast2/read.hpp index 197b31f..e02c624 100644 --- a/include/boost/http_io/read.hpp +++ b/include/boost/beast2/read.hpp @@ -4,13 +4,13 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // -#ifndef BOOST_HTTP_IO_READ_HPP -#define BOOST_HTTP_IO_READ_HPP +#ifndef BOOST_BEAST2_READ_HPP +#define BOOST_BEAST2_READ_HPP -#include +#include #include #include #include @@ -18,7 +18,7 @@ #include namespace boost { -namespace http_io { +namespace beast2 { /** Read a complete header from the stream. @@ -229,9 +229,9 @@ async_read( BOOST_ASIO_DEFAULT_COMPLETION_TOKEN( typename AsyncReadStream::executor_type)); -} // http_io +} // beast2 } // boost -#include +#include #endif diff --git a/include/boost/http_io/server/any_lambda.hpp b/include/boost/beast2/server/any_lambda.hpp similarity index 95% rename from include/boost/http_io/server/any_lambda.hpp rename to include/boost/beast2/server/any_lambda.hpp index 26c3724..5ff64e2 100644 --- a/include/boost/http_io/server/any_lambda.hpp +++ b/include/boost/beast2/server/any_lambda.hpp @@ -4,13 +4,13 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // -#ifndef BOOST_HTTP_IO_SERVER_ANY_LAMBDA_HPP -#define BOOST_HTTP_IO_SERVER_ANY_LAMBDA_HPP +#ifndef BOOST_BEAST2_SERVER_ANY_LAMBDA_HPP +#define BOOST_BEAST2_SERVER_ANY_LAMBDA_HPP -#include +#include #include #include @@ -21,7 +21,7 @@ #include namespace boost { -namespace http_io { +namespace beast2 { namespace detail { @@ -176,7 +176,7 @@ struct any_lambda std::forward(args)...); } }; -} // http_io +} // beast2 } // boost #endif diff --git a/include/boost/http_io/server/call_mf.hpp b/include/boost/beast2/server/call_mf.hpp similarity index 85% rename from include/boost/http_io/server/call_mf.hpp rename to include/boost/beast2/server/call_mf.hpp index 7835dd9..6e470b3 100644 --- a/include/boost/http_io/server/call_mf.hpp +++ b/include/boost/beast2/server/call_mf.hpp @@ -4,18 +4,18 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // -#ifndef BOOST_HTTP_IO_SERVER_CALL_MF_HPP -#define BOOST_HTTP_IO_SERVER_CALL_MF_HPP +#ifndef BOOST_BEAST2_SERVER_CALL_MF_HPP +#define BOOST_BEAST2_SERVER_CALL_MF_HPP -#include +#include #include #include namespace boost { -namespace http_io { +namespace beast2 { namespace detail { // Primary template @@ -66,7 +66,7 @@ inline call_mf_impl call_mf(MemFn memfn, T* obj) return call_mf_impl(obj, memfn); } -} // http_io +} // beast2 } // boost #endif diff --git a/include/boost/http_io/server/fixed_array.hpp b/include/boost/beast2/server/fixed_array.hpp similarity index 97% rename from include/boost/http_io/server/fixed_array.hpp rename to include/boost/beast2/server/fixed_array.hpp index 2b7ea5a..17decf3 100644 --- a/include/boost/http_io/server/fixed_array.hpp +++ b/include/boost/beast2/server/fixed_array.hpp @@ -4,13 +4,13 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // -#ifndef BOOST_HTTP_IO_SERVER_FIXED_ARRAY_HPP -#define BOOST_HTTP_IO_SERVER_FIXED_ARRAY_HPP +#ifndef BOOST_BEAST2_SERVER_FIXED_ARRAY_HPP +#define BOOST_BEAST2_SERVER_FIXED_ARRAY_HPP -#include +#include #include #include #include diff --git a/include/boost/http_io/server/impl/workers.hpp b/include/boost/beast2/server/impl/workers.hpp similarity index 94% rename from include/boost/http_io/server/impl/workers.hpp rename to include/boost/beast2/server/impl/workers.hpp index 83042dd..f43dbcc 100644 --- a/include/boost/http_io/server/impl/workers.hpp +++ b/include/boost/beast2/server/impl/workers.hpp @@ -4,17 +4,17 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // -#ifndef BOOST_HTTP_IO_SERVER_IMPL_WORKERS_HPP -#define BOOST_HTTP_IO_SERVER_IMPL_WORKERS_HPP +#ifndef BOOST_BEAST2_SERVER_IMPL_WORKERS_HPP +#define BOOST_BEAST2_SERVER_IMPL_WORKERS_HPP #include #include namespace boost { -namespace http_io { +namespace beast2 { template struct workers:: @@ -60,7 +60,7 @@ template template workers:: workers( - http_io::server& srv, + beast2::server& srv, Executor1 const& ex, unsigned concurrency, std::size_t num_workers, @@ -78,7 +78,7 @@ workers( } template -http_io::server& +beast2::server& workers:: server() noexcept { @@ -189,7 +189,7 @@ do_stop() w.w.cancel(); } -} // http_io +} // beast2 } // boost #endif diff --git a/include/boost/http_io/server/logger.hpp b/include/boost/beast2/server/logger.hpp similarity index 90% rename from include/boost/http_io/server/logger.hpp rename to include/boost/beast2/server/logger.hpp index e348f8b..76cb8e4 100644 --- a/include/boost/http_io/server/logger.hpp +++ b/include/boost/beast2/server/logger.hpp @@ -4,24 +4,24 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // -#ifndef BOOST_HTTP_IO_SERVER_LOGGER_HPP -#define BOOST_HTTP_IO_SERVER_LOGGER_HPP +#ifndef BOOST_BEAST2_SERVER_LOGGER_HPP +#define BOOST_BEAST2_SERVER_LOGGER_HPP -#include +#include #include #include #include #include namespace boost { -namespace http_io { +namespace beast2 { struct section { - BOOST_HTTP_IO_DECL + BOOST_BEAST2_DECL section() noexcept; /** Return the level below which logging is squelched @@ -76,11 +76,11 @@ struct section *plen = ss.str().size() - n0; } - BOOST_HTTP_IO_DECL + BOOST_BEAST2_DECL void format_impl(int, core::string_view, char const*, std::size_t*, std::size_t n); - BOOST_HTTP_IO_DECL + BOOST_BEAST2_DECL void write(int, boost::core::string_view); section(core::string_view); @@ -130,12 +130,12 @@ class log_sections public: /** Destructor */ - BOOST_HTTP_IO_DECL + BOOST_BEAST2_DECL ~log_sections(); /** Constructor */ - BOOST_HTTP_IO_DECL + BOOST_BEAST2_DECL log_sections(); /** Return a log section by name. @@ -143,7 +143,7 @@ class log_sections If the section does not already exist, it is created. The name is case sensitive. */ - BOOST_HTTP_IO_DECL + BOOST_BEAST2_DECL section get(core::string_view name); @@ -189,7 +189,7 @@ class log_sections #define LOG_FTL(sect, ...) LOG_AT_LEVEL(sect, 5, __VA_ARGS__) #endif -} // http_io +} // beast2 } // boost #endif diff --git a/include/boost/http_io/server/route_params.hpp b/include/boost/beast2/server/route_params.hpp similarity index 83% rename from include/boost/http_io/server/route_params.hpp rename to include/boost/beast2/server/route_params.hpp index a2f750d..00c4ec9 100644 --- a/include/boost/http_io/server/route_params.hpp +++ b/include/boost/beast2/server/route_params.hpp @@ -4,20 +4,20 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // -#ifndef BOOST_HTTP_IO_SERVER_ROUTE_PARAMS_HPP -#define BOOST_HTTP_IO_SERVER_ROUTE_PARAMS_HPP +#ifndef BOOST_BEAST2_SERVER_ROUTE_PARAMS_HPP +#define BOOST_BEAST2_SERVER_ROUTE_PARAMS_HPP -#include +#include #include #include #include #include namespace boost { -namespace http_io { +namespace beast2 { struct acceptor_config { @@ -61,7 +61,7 @@ struct AsioResponse : Response } }; -} // http_io +} // beast2 } // boost #endif diff --git a/include/boost/http_io/server/router.hpp b/include/boost/beast2/server/router.hpp similarity index 89% rename from include/boost/http_io/server/router.hpp rename to include/boost/beast2/server/router.hpp index 7757ad8..0ae863c 100644 --- a/include/boost/http_io/server/router.hpp +++ b/include/boost/beast2/server/router.hpp @@ -4,21 +4,21 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // -#ifndef BOOST_HTTP_IO_SERVER_ROUTER_HPP -#define BOOST_HTTP_IO_SERVER_ROUTER_HPP +#ifndef BOOST_BEAST2_SERVER_ROUTER_HPP +#define BOOST_BEAST2_SERVER_ROUTER_HPP -#include -#include +#include +#include #include #include #include #include namespace boost { -namespace http_io { +namespace beast2 { struct Request; @@ -60,7 +60,7 @@ class router_base struct BOOST_SYMBOL_VISIBLE any_handler { - BOOST_HTTP_IO_DECL + BOOST_BEAST2_DECL virtual ~any_handler(); virtual bool operator()( @@ -69,21 +69,21 @@ class router_base using handler_ptr = std::unique_ptr; - BOOST_HTTP_IO_DECL + BOOST_BEAST2_DECL router_base( http_proto::method(*)(void*), urls::segments_encoded_view&(*)(void*)); - BOOST_HTTP_IO_DECL + BOOST_BEAST2_DECL void use(handler_ptr); - BOOST_HTTP_IO_DECL + BOOST_BEAST2_DECL void insert( http_proto::method, core::string_view, handler_ptr); - BOOST_HTTP_IO_DECL + BOOST_BEAST2_DECL bool invoke(void*, void*) const; struct entry; @@ -98,7 +98,7 @@ class router_base */ template< class Response, - class Request = http_io::Request> + class Request = beast2::Request> class router : public router_base { public: @@ -186,7 +186,7 @@ class router : public router_base //------------------------------------------------ -} // http_io +} // beast2 } // boost #endif diff --git a/include/boost/http_io/server/server.hpp b/include/boost/beast2/server/server.hpp similarity index 84% rename from include/boost/http_io/server/server.hpp rename to include/boost/beast2/server/server.hpp index 7e08be8..80f5bc8 100644 --- a/include/boost/http_io/server/server.hpp +++ b/include/boost/beast2/server/server.hpp @@ -4,19 +4,19 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // -#ifndef BOOST_HTTP_IO_SERVER_SERVER_HPP -#define BOOST_HTTP_IO_SERVER_SERVER_HPP +#ifndef BOOST_BEAST2_SERVER_SERVER_HPP +#define BOOST_BEAST2_SERVER_SERVER_HPP -#include +#include #include #include #include namespace boost { -namespace http_io { +namespace beast2 { class log_sections; @@ -41,7 +41,7 @@ class BOOST_SYMBOL_VISIBLE part { public: - BOOST_HTTP_IO_DECL + BOOST_BEAST2_DECL virtual ~part(); /** Called once when the server starts @@ -61,24 +61,24 @@ class BOOST_SYMBOL_VISIBLE /** Destructor */ - BOOST_HTTP_IO_DECL + BOOST_BEAST2_DECL ~server(); /** Constructor */ - BOOST_HTTP_IO_DECL + BOOST_BEAST2_DECL server(); - BOOST_HTTP_IO_DECL + BOOST_BEAST2_DECL bool is_stopping() const noexcept; - BOOST_HTTP_IO_DECL + BOOST_BEAST2_DECL rts::context& services() noexcept; - BOOST_HTTP_IO_DECL + BOOST_BEAST2_DECL log_sections& sections() noexcept; - BOOST_HTTP_IO_DECL + BOOST_BEAST2_DECL void install(std::unique_ptr pp); /** Stop the server @@ -91,9 +91,9 @@ class BOOST_SYMBOL_VISIBLE @par Thread Safety May not be called concurrently */ - BOOST_HTTP_IO_DECL void do_start(); + BOOST_BEAST2_DECL void do_start(); - BOOST_HTTP_IO_DECL void do_stop(); + BOOST_BEAST2_DECL void do_stop(); private: enum state : char; @@ -127,7 +127,7 @@ emplace_part( return part; } -} // http_io +} // beast2 } // boost #endif diff --git a/include/boost/http_io/server/server_asio.hpp b/include/boost/beast2/server/server_asio.hpp similarity index 71% rename from include/boost/http_io/server/server_asio.hpp rename to include/boost/beast2/server/server_asio.hpp index e722d34..687e9ec 100644 --- a/include/boost/http_io/server/server_asio.hpp +++ b/include/boost/beast2/server/server_asio.hpp @@ -4,18 +4,18 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // -#ifndef BOOST_HTTP_IO_SERVER_SERVER_ASIO_HPP -#define BOOST_HTTP_IO_SERVER_SERVER_ASIO_HPP +#ifndef BOOST_BEAST2_SERVER_SERVER_ASIO_HPP +#define BOOST_BEAST2_SERVER_SERVER_ASIO_HPP -#include -#include +#include +#include #include namespace boost { -namespace http_io { +namespace beast2 { /** A server using Boost.Asio's I/O model */ @@ -28,15 +28,15 @@ class BOOST_SYMBOL_VISIBLE server_asio /** Destructor */ - BOOST_HTTP_IO_DECL + BOOST_BEAST2_DECL ~server_asio(); /** Constructor */ - BOOST_HTTP_IO_DECL + BOOST_BEAST2_DECL server_asio(int num_threads); - BOOST_HTTP_IO_DECL + BOOST_BEAST2_DECL executor_type get_executor() noexcept; @@ -44,12 +44,12 @@ class BOOST_SYMBOL_VISIBLE server_asio This function blocks until the server is stopped. */ - BOOST_HTTP_IO_DECL + BOOST_BEAST2_DECL void run(); /** Stop the server */ - BOOST_HTTP_IO_DECL + BOOST_BEAST2_DECL void stop() override; private: @@ -61,7 +61,7 @@ class BOOST_SYMBOL_VISIBLE server_asio impl* impl_; }; -} // http_io +} // beast2 } // boost #endif diff --git a/include/boost/http_io/server/workers.hpp b/include/boost/beast2/server/workers.hpp similarity index 82% rename from include/boost/http_io/server/workers.hpp rename to include/boost/beast2/server/workers.hpp index ce0fbd9..9b4fe51 100644 --- a/include/boost/http_io/server/workers.hpp +++ b/include/boost/beast2/server/workers.hpp @@ -4,31 +4,31 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // -#ifndef BOOST_HTTP_IO_SERVER_WORKERS_HPP -#define BOOST_HTTP_IO_SERVER_WORKERS_HPP +#ifndef BOOST_BEAST2_SERVER_WORKERS_HPP +#define BOOST_BEAST2_SERVER_WORKERS_HPP -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include namespace boost { -namespace http_io { +namespace beast2 { class BOOST_SYMBOL_VISIBLE workers_base { public: - BOOST_HTTP_IO_DECL + BOOST_BEAST2_DECL virtual ~workers_base(); - virtual http_io::server& server() noexcept = 0; + virtual beast2::server& server() noexcept = 0; virtual void do_idle(void* worker) = 0; }; @@ -46,7 +46,7 @@ class BOOST_SYMBOL_VISIBLE using executor_type = Executor; using protocol_type = asio::ip::tcp; using socket_type = asio::basic_stream_socket; - using acceptor_config = http_io::acceptor_config; + using acceptor_config = beast2::acceptor_config; asio::basic_stream_socket& socket() noexcept; typename protocol_type::endpoint& endpoint() noexcept; @@ -82,7 +82,7 @@ class workers */ template workers( - http_io::server& srv, + beast2::server& srv, Executor1 const& ex, unsigned concurrency, std::size_t num_workers, @@ -107,14 +107,14 @@ class workers void start() override; void stop() override; - http_io::server& server() noexcept override; + beast2::server& server() noexcept override; void do_idle(void*) override; void do_accepts(); void on_accept(acceptor*, worker*, system::error_code const&); void do_stop(); - http_io::server& srv_; + beast2::server& srv_; section sect_; Executor ex_; fixed_array vw_; @@ -124,9 +124,9 @@ class workers unsigned concurrency_; }; -} // http_io +} // beast2 } // boost -#include +#include #endif diff --git a/include/boost/http_io/ssl_stream.hpp b/include/boost/beast2/ssl_stream.hpp similarity index 96% rename from include/boost/http_io/ssl_stream.hpp rename to include/boost/beast2/ssl_stream.hpp index bc1f224..b65fd9f 100644 --- a/include/boost/http_io/ssl_stream.hpp +++ b/include/boost/beast2/ssl_stream.hpp @@ -4,18 +4,18 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // -#ifndef BOOST_HTTP_IO_SSL_SOCKET_HPP -#define BOOST_HTTP_IO_SSL_SOCKET_HPP +#ifndef BOOST_BEAST2_SSL_SOCKET_HPP +#define BOOST_BEAST2_SSL_SOCKET_HPP -#include +#include #include #include namespace boost { -namespace http_io { +namespace beast2 { /** A stream which can be either plain or SSL */ @@ -190,7 +190,7 @@ class ssl_stream bool is_ssl_ = false; }; -} // http_io +} // beast2 } // boost #endif diff --git a/include/boost/http_io/write.hpp b/include/boost/beast2/write.hpp similarity index 90% rename from include/boost/http_io/write.hpp rename to include/boost/beast2/write.hpp index 8f90657..5dd79c5 100644 --- a/include/boost/http_io/write.hpp +++ b/include/boost/beast2/write.hpp @@ -4,19 +4,19 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // -#ifndef BOOST_HTTP_IO_WRITE_HPP -#define BOOST_HTTP_IO_WRITE_HPP +#ifndef BOOST_BEAST2_WRITE_HPP +#define BOOST_BEAST2_WRITE_HPP -#include +#include #include #include #include namespace boost { -namespace http_io { +namespace beast2 { /** Write HTTP data to a stream */ @@ -75,9 +75,9 @@ async_relay_some( typename AsyncWriteStream::executor_type)); #endif -} // http_io +} // beast2 } // boost -#include +#include #endif diff --git a/include/boost/http_io/detail/config.hpp b/include/boost/http_io/detail/config.hpp deleted file mode 100644 index 53b293f..0000000 --- a/include/boost/http_io/detail/config.hpp +++ /dev/null @@ -1,58 +0,0 @@ -// -// Copyright (c) 2019 Vinnie Falco (vinnie.falco@gmail.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/cppalliance/http_io -// - -#ifndef BOOST_HTTP_IO_DETAIL_CONFIG_HPP -#define BOOST_HTTP_IO_DETAIL_CONFIG_HPP - -#include - -namespace boost { -namespace http_io { - -# if (defined(BOOST_HTTP_IO_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)) && !defined(BOOST_HTTP_IO_STATIC_LINK) -# if defined(BOOST_HTTP_IO_SOURCE) -# define BOOST_HTTP_IO_DECL BOOST_SYMBOL_EXPORT -# define BOOST_HTTP_IO_CLASS_DECL BOOST_SYMBOL_EXPORT -# define BOOST_HTTP_IO_BUILD_DLL -# else -# define BOOST_HTTP_IO_DECL BOOST_SYMBOL_IMPORT -# define BOOST_HTTP_IO_CLASS_DECL BOOST_SYMBOL_IMPORT -# endif -# endif // shared lib -# ifndef BOOST_HTTP_IO_DECL -# define BOOST_HTTP_IO_DECL -# endif -# if !defined(BOOST_HTTP_IO_SOURCE) && !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_HTTP_IO_NO_LIB) -# define BOOST_LIB_NAME boost_json -# if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_HTTP_IO_DYN_LINK) -# define BOOST_DYN_LINK -# endif -# include -# endif - -// Add source location to error codes -#ifdef BOOST_HTTP_IO_NO_SOURCE_LOCATION -# define BOOST_HTTP_IO_ERR(ev) (::boost::system::error_code(ev)) -# define BOOST_HTTP_IO_RETURN_EC(ev) return (ev) -#else -# define BOOST_HTTP_IO_ERR(ev) ( \ - ::boost::system::error_code( (ev), [] { \ - static constexpr auto loc((BOOST_CURRENT_LOCATION)); \ - return &loc; }())) -# define BOOST_HTTP_IO_RETURN_EC(ev) \ - do { \ - static constexpr auto loc ## __LINE__((BOOST_CURRENT_LOCATION)); \ - return ::boost::system::error_code((ev), &loc ## __LINE__); \ - } while(0) -#endif - -} // http_io -} // boost - -#endif diff --git a/src/detail/except.cpp b/src/detail/except.cpp index 49cbb2b..1fc3be8 100644 --- a/src/detail/except.cpp +++ b/src/detail/except.cpp @@ -4,16 +4,16 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // -#include -#include +#include +#include #include #include namespace boost { -namespace http_io { +namespace beast2 { namespace detail { void @@ -37,5 +37,5 @@ throw_invalid_argument( } } // detail -} // http_io +} // beast2 } // boost diff --git a/src/server/endpoint.cpp b/src/server/endpoint.cpp index 9d8b60d..da9c5c4 100644 --- a/src/server/endpoint.cpp +++ b/src/server/endpoint.cpp @@ -4,14 +4,14 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // -#include +#include #include namespace boost { -namespace http_io { +namespace beast2 { endpoint:: ~endpoint() @@ -98,5 +98,5 @@ format(std::ostream& os) const os << ':' << port_; } -} // http_io +} // beast2 } // boost diff --git a/src/server/logger.cpp b/src/server/logger.cpp index e072a33..dd00068 100644 --- a/src/server/logger.cpp +++ b/src/server/logger.cpp @@ -4,16 +4,16 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // -#include +#include #include #include #include namespace boost { -namespace http_io { +namespace beast2 { section:: section() noexcept = default; @@ -118,5 +118,5 @@ get(core::string_view name) return v; } -} // http_io +} // beast2 } // boost diff --git a/src/server/router.cpp b/src/server/router.cpp index 16ac5f9..46c0795 100644 --- a/src/server/router.cpp +++ b/src/server/router.cpp @@ -4,10 +4,10 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // -#include +#include #include #include #include @@ -18,7 +18,7 @@ #include namespace boost { -namespace http_io { +namespace beast2 { namespace grammar = urls::grammar; @@ -315,5 +315,5 @@ invoke( return true; } -} // http_io +} // beast2 } // boost diff --git a/src/server/server.cpp b/src/server/server.cpp index 6f9c86c..bdcee05 100644 --- a/src/server/server.cpp +++ b/src/server/server.cpp @@ -4,17 +4,17 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // -#include -#include -#include +#include +#include +#include #include #include namespace boost { -namespace http_io { +namespace beast2 { enum server::state : char { @@ -136,5 +136,5 @@ do_stop() } } -} // http_io +} // beast2 } // boost diff --git a/src/server/server_asio.cpp b/src/server/server_asio.cpp index fc63e48..731494b 100644 --- a/src/server/server_asio.cpp +++ b/src/server/server_asio.cpp @@ -4,11 +4,11 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // -#include -#include +#include +#include #include #include #include @@ -16,7 +16,7 @@ #include namespace boost { -namespace http_io { +namespace beast2 { struct server_asio::impl { @@ -142,5 +142,5 @@ on_timer( } } -} // http_io +} // beast2 } // boost diff --git a/src/server/workers.cpp b/src/server/workers.cpp index 88b903e..2a740b8 100644 --- a/src/server/workers.cpp +++ b/src/server/workers.cpp @@ -4,16 +4,16 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // -#include +#include namespace boost { -namespace http_io { +namespace beast2 { workers_base:: ~workers_base() = default; -} // http_io +} // beast2 } // boost diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index eb724b2..ffd28f5 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -4,7 +4,7 @@ # 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/cppalliance/http_io +# Official repository: https://github.com/cppalliance/beast2 # if(NOT TARGET tests) diff --git a/test/unit/CMakeLists.txt b/test/unit/CMakeLists.txt index a4ee7fe..2b3c2d3 100644 --- a/test/unit/CMakeLists.txt +++ b/test/unit/CMakeLists.txt @@ -4,7 +4,7 @@ # 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/cppalliance/http_io +# Official repository: https://github.com/cppalliance/beast2 # set(EXTRAFILES @@ -22,18 +22,18 @@ list(APPEND PFILES find_package(OpenSSL REQUIRED) source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX "" FILES ${PFILES}) source_group("_extra" FILES ${EXTRAFILES}) -add_executable(boost_http_io_tests ${PFILES} ${EXTRAFILES}) -target_include_directories(boost_http_io_tests +add_executable(boost_beast2_tests ${PFILES} ${EXTRAFILES}) +target_include_directories(boost_beast2_tests PRIVATE . ../../example/include ../../../url/extra/test_suite ) -target_link_libraries(boost_http_io_tests PRIVATE +target_link_libraries(boost_beast2_tests PRIVATE OpenSSL::SSL Boost::beast - Boost::http_io + Boost::beast2 ) -add_test(NAME boost_http_io_tests COMMAND boost_http_io_tests) -add_dependencies(tests boost_http_io_tests) +add_test(NAME boost_beast2_tests COMMAND boost_beast2_tests) +add_dependencies(tests boost_beast2_tests) diff --git a/test/unit/Jamfile b/test/unit/Jamfile index 1b4114d..21409c1 100644 --- a/test/unit/Jamfile +++ b/test/unit/Jamfile @@ -4,7 +4,7 @@ # 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/cppalliance/http_io +# Official repository: https://github.com/cppalliance/beast2 # import testing ; @@ -15,7 +15,7 @@ using openssl ; project : requirements $(c11-requires) - /boost/http_io//boost_http_io + /boost/beast2//boost_beast2 /boost/beast//boost_beast/off [ ac.check-library /openssl//ssl/off : /openssl//ssl/off : ] ../../../url/extra/test_suite/test_main.cpp diff --git a/test/unit/buffer.cpp b/test/unit/buffer.cpp index 3f47932..9312b89 100644 --- a/test/unit/buffer.cpp +++ b/test/unit/buffer.cpp @@ -4,7 +4,7 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // #include @@ -14,7 +14,7 @@ #include "test_suite.hpp" namespace boost { -namespace http_io { +namespace beast2 { BOOST_STATIC_ASSERT( std::is_constructible< @@ -36,7 +36,7 @@ struct buffer_test TEST_SUITE( buffer_test, - "boost.http_io.buffer"); + "boost.beast2.buffer"); -} // http_io +} // beast2 } // boost diff --git a/test/unit/client.cpp b/test/unit/client.cpp index 753201a..405fe46 100644 --- a/test/unit/client.cpp +++ b/test/unit/client.cpp @@ -4,18 +4,18 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // // Test that header file is self-contained. -#include +#include #include #include "test_suite.hpp" namespace boost { -namespace http_io { +namespace beast2 { struct success_handler { @@ -93,7 +93,7 @@ class client_test } }; -TEST_SUITE(client_test, "boost.http_io.client"); +TEST_SUITE(client_test, "boost.beast2.client"); -} // http_io +} // beast2 } // boost diff --git a/test/unit/endpoint.cpp b/test/unit/endpoint.cpp index bbe1391..22665f6 100644 --- a/test/unit/endpoint.cpp +++ b/test/unit/endpoint.cpp @@ -4,16 +4,16 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // // Test that header file is self-contained. -#include +#include #include "test_suite.hpp" namespace boost { -namespace http_io { +namespace beast2 { struct endpoint_test { @@ -25,7 +25,7 @@ struct endpoint_test TEST_SUITE( endpoint_test, - "boost.http_io.endpoint"); + "boost.beast2.endpoint"); -} // http_io +} // beast2 } // boost diff --git a/test/unit/read.cpp b/test/unit/read.cpp index 52938ce..29ee114 100644 --- a/test/unit/read.cpp +++ b/test/unit/read.cpp @@ -4,11 +4,11 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // // Test that header file is self-contained. -#include +#include #include #include @@ -16,7 +16,7 @@ #include "test_suite.hpp" namespace boost { -namespace http_io { +namespace beast2 { #if 0 @@ -106,7 +106,7 @@ class read_test } }; -TEST_SUITE(read_test, "boost.http_io.read"); +TEST_SUITE(read_test, "boost.beast2.read"); -} // http_io +} // beast2 } // boost diff --git a/test/unit/sandbox.cpp b/test/unit/sandbox.cpp index 8be0059..85acf00 100644 --- a/test/unit/sandbox.cpp +++ b/test/unit/sandbox.cpp @@ -4,7 +4,7 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // #include "test_suite.hpp" @@ -221,7 +221,7 @@ struct sandbox_test TEST_SUITE( sandbox_test, - "boost.http_io.sandbox"); + "boost.beast2.sandbox"); } // http_proto } // boost diff --git a/test/unit/server/fixed_array.cpp b/test/unit/server/fixed_array.cpp index e0ff096..ad9b1c0 100644 --- a/test/unit/server/fixed_array.cpp +++ b/test/unit/server/fixed_array.cpp @@ -4,15 +4,15 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // -#include +#include #include "test_suite.hpp" namespace boost { -namespace http_io { +namespace beast2 { struct fixed_array_test { @@ -24,7 +24,7 @@ struct fixed_array_test TEST_SUITE( fixed_array_test, - "boost.http_io.server.fixed_array"); + "boost.beast2.server.fixed_array"); -} // http_io +} // beast2 } // boost diff --git a/test/unit/server/router.cpp b/test/unit/server/router.cpp index e394901..8d02e37 100644 --- a/test/unit/server/router.cpp +++ b/test/unit/server/router.cpp @@ -4,18 +4,18 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // // Test that header file is self-contained. -#include +#include -#include +#include #include "test_suite.hpp" namespace boost { -namespace http_io { +namespace beast2 { struct router_test { @@ -101,8 +101,8 @@ struct router_test TEST_SUITE( router_test, - "boost.http_io.server.router"); + "boost.beast2.server.router"); -} // http_io +} // beast2 } // boost diff --git a/test/unit/ssl_stream.cpp b/test/unit/ssl_stream.cpp index e6455b5..27562d0 100644 --- a/test/unit/ssl_stream.cpp +++ b/test/unit/ssl_stream.cpp @@ -4,17 +4,17 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // // Test that header file is self-contained. -#include +#include #include #include #include "test_suite.hpp" namespace boost { -namespace http_io { +namespace beast2 { class ssl_stream_test { @@ -29,7 +29,7 @@ class ssl_stream_test } }; -TEST_SUITE(ssl_stream_test, "boost.http_io.ssl_stream"); +TEST_SUITE(ssl_stream_test, "boost.beast2.ssl_stream"); -} // http_io +} // beast2 } // boost diff --git a/test/unit/write.cpp b/test/unit/write.cpp index a28b6ae..90c5da4 100644 --- a/test/unit/write.cpp +++ b/test/unit/write.cpp @@ -4,16 +4,16 @@ // 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/cppalliance/http_io +// Official repository: https://github.com/cppalliance/beast2 // // Test that header file is self-contained. -#include +#include #include "test_suite.hpp" namespace boost { -namespace http_io { +namespace beast2 { class any_async_read_stream { @@ -36,7 +36,7 @@ class write_test TEST_SUITE( write_test, - "boost.http_io.write"); + "boost.beast2.write"); -} // http_io +} // beast2 } // boost