Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .drone/drone.bat
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ pushd !BOOST_ROOT!\libs
git clone https://github.com/cppalliance/buffers -b !BOOST_BRANCH! --depth 1
popd
pushd !BOOST_ROOT!\libs
git clone https://github.com/cppalliance/rts -b !BOOST_BRANCH! --depth 1
git clone https://github.com/cppalliance/capy -b !BOOST_BRANCH! --depth 1
popd

echo '==================================> COMPILE'
Expand Down
8 changes: 4 additions & 4 deletions .drone/drone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ common_install () {
popd
fi

if [ ! -d "$BOOST_ROOT/libs/rts" ]; then
if [ ! -d "$BOOST_ROOT/libs/capy" ]; then
pushd $BOOST_ROOT/libs
git clone https://github.com/cppalliance/rts -b $BOOST_BRANCH --depth 1
git clone https://github.com/cppalliance/capy -b $BOOST_BRANCH --depth 1
popd
fi
}
Expand Down Expand Up @@ -126,9 +126,9 @@ if [ ! -d "$BOOST_ROOT/libs/buffers" ]; then
git clone https://github.com/cppalliance/buffers -b $BOOST_BRANCH --depth 1
popd
fi
if [ ! -d "$BOOST_ROOT/libs/rts" ]; then
if [ ! -d "$BOOST_ROOT/libs/capy" ]; then
pushd $BOOST_ROOT/libs
git clone https://github.com/cppalliance/rts -b $BOOST_BRANCH --depth 1
git clone https://github.com/cppalliance/capy -b $BOOST_BRANCH --depth 1
popd
fi
cd libs/$SELF
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -870,11 +870,11 @@ jobs:
repository: cppalliance/buffers
ref: develop

- name: Clone Boost.RunTimeServices
- name: Clone Boost.Capy
uses: actions/checkout@v3
with:
path: rts-root
repository: cppalliance/rts
path: capy-root
repository: cppalliance/capy
ref: develop

- name: Setup C++
Expand Down Expand Up @@ -906,11 +906,11 @@ jobs:
scan-modules-dir: |
http-proto-root
buffers-root
rts-root
capy-root
scan-modules-ignore: |
http_proto
buffers
rts
capy

- name: Install Packages (Windows)
uses: alandefreitas/cpp-actions/package-install@v1.9.0
Expand All @@ -932,8 +932,8 @@ jobs:
triplet=${{ matrix.x86 && 'x86-windows-static' || 'x64-windows' }}
addrmdl=${{ matrix.x86 && '32' || '64' }}

# This is temporary until we move rts/build/brotli.jam to boost/tools/build
echo "import-search ${home}/boost-root/libs/rts/build ;" | sed 's/\/d\//D:\//g' >> user-config.jam
# This is temporary until we move capy/build/brotli.jam to boost/tools/build
echo "import-search ${home}/boost-root/libs/capy/build ;" | sed 's/\/d\//D:\//g' >> user-config.jam

echo "using zlib : : <include>\"${home}/vcpkg-root/installed/${triplet}/include\" <search>\"${home}/vcpkg-root/installed/${triplet}/lib\" <dll-path>\"${home}/vcpkg-root/installed/${triplet}/bin\" <name>zlib : <address-model>${addrmdl} ;" | sed 's/\/d\//D:\//g' >> user-config.jam
echo "using brotli : : <include>\"${home}/vcpkg-root/installed/${triplet}/include\" <search>\"${home}/vcpkg-root/installed/${triplet}/lib\" <dll-path>\"${home}/vcpkg-root/installed/${triplet}/bin\" : <address-model>${addrmdl} ;" | sed 's/\/d\//D:\//g' >> user-config.jam
Expand Down Expand Up @@ -980,7 +980,7 @@ jobs:
# Patch boost-root with workspace module
cp -r "$workspace_root"/http-proto-root "libs/$module"
cp -r "$workspace_root"/buffers-root libs/buffers
cp -r "$workspace_root"/rts-root libs/rts
cp -r "$workspace_root"/capy-root libs/capy

- name: Boost B2 Workflow
uses: alandefreitas/cpp-actions/b2-workflow@v1.9.0
Expand Down Expand Up @@ -1203,11 +1203,11 @@ jobs:
repository: cppalliance/buffers
ref: develop

- name: Clone Boost.RunTimeServices
- name: Clone Boost.Capy
uses: actions/checkout@v3
with:
path: rts-root
repository: cppalliance/rts
path: capy-root
repository: cppalliance/capy
ref: develop

- name: Clone Boost
Expand All @@ -1220,11 +1220,11 @@ jobs:
scan-modules-dir: |
http-proto-root
buffers-root
rts-root
capy-root
scan-modules-ignore: |
http_proto
buffers
rts
capy

- name: Patch Boost
id: patch
Expand Down Expand Up @@ -1258,7 +1258,7 @@ jobs:
# Patch boost-root with workspace module
cp -r "$workspace_root"/http-proto-root "libs/$module"
cp -r "$workspace_root"/buffers-root libs/buffers
cp -r "$workspace_root"/rts-root libs/rts
cp -r "$workspace_root"/capy-root libs/capy

- uses: actions/setup-node@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ set(BOOST_SRC_DIR ${DEFAULT_BOOST_SRC_DIR} CACHE STRING "Boost source dir to use
set(BOOST_HTTP_PROTO_DEPENDENCIES
Boost::assert
Boost::buffers
Boost::capy
Boost::config
Boost::core
Boost::rts
Boost::static_assert
Boost::system
Boost::throw_exception
Expand Down
4 changes: 2 additions & 2 deletions build/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ lib boost_http_proto
: http_proto_sources
: requirements
<library>/boost//buffers
<library>/boost//rts
<library>/boost//capy
<library>/boost//url
<include>../
<define>BOOST_HTTP_PROTO_SOURCE
: usage-requirements
<library>/boost//buffers
<library>/boost//rts
<library>/boost//capy
<library>/boost//url
;

Expand Down
10 changes: 5 additions & 5 deletions include/boost/http_proto/parser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <boost/buffers/dynamic_buffer.hpp>
#include <boost/buffers/buffer_pair.hpp>
#include <boost/core/span.hpp>
#include <boost/rts/polystore_fwd.hpp>
#include <boost/capy/polystore_fwd.hpp>

#include <cstddef>
#include <cstdint>
Expand Down Expand Up @@ -617,7 +617,7 @@ class parser
BOOST_HTTP_PROTO_DECL ~parser();
BOOST_HTTP_PROTO_DECL parser() noexcept;
BOOST_HTTP_PROTO_DECL parser(parser&& other) noexcept;
BOOST_HTTP_PROTO_DECL parser(rts::polystore&, detail::kind);
BOOST_HTTP_PROTO_DECL parser(capy::polystore&, detail::kind);
BOOST_HTTP_PROTO_DECL void assign(parser&& other) noexcept;

BOOST_HTTP_PROTO_DECL
Expand Down Expand Up @@ -668,7 +668,7 @@ struct parser::config_base

/** Enable Brotli Content-Encoding decoding.

Requires `boost::rts::brotli::decode_service` to be
Requires `boost::capy::brotli::decode_service` to be
installed, otherwise an exception is thrown.
*/
bool apply_brotli_decoder = false;
Expand All @@ -693,7 +693,7 @@ struct parser::config_base
Larger windows improve decompression at the cost
of memory. If a larger window is required than
allowed, decoding fails with
`rts::zlib::error::data_err`.
`capy::zlib::error::data_err`.
*/
int zlib_window_bits = 15;

Expand Down Expand Up @@ -769,7 +769,7 @@ struct parser::config_base
BOOST_HTTP_PROTO_DECL
void
install_parser_service(
rts::polystore& ctx,
capy::polystore& ctx,
parser::config_base const& cfg);

} // http_proto
Expand Down
2 changes: 1 addition & 1 deletion include/boost/http_proto/request_parser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ class request_parser
*/
BOOST_HTTP_PROTO_DECL
explicit
request_parser(rts::polystore& ctx);
request_parser(capy::polystore& ctx);

/** Return a reference to the parsed request headers.

Expand Down
2 changes: 1 addition & 1 deletion include/boost/http_proto/response_parser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ class response_parser
*/
BOOST_HTTP_PROTO_DECL
explicit
response_parser(rts::polystore& ctx);
response_parser(capy::polystore& ctx);

/** Prepare for the next message on the stream.

Expand Down
8 changes: 4 additions & 4 deletions include/boost/http_proto/serializer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

#include <boost/buffers/buffer_pair.hpp>
#include <boost/core/span.hpp>
#include <boost/rts/polystore_fwd.hpp>
#include <boost/capy/polystore_fwd.hpp>
#include <boost/system/result.hpp>

#include <type_traits>
Expand Down Expand Up @@ -171,7 +171,7 @@ class serializer
BOOST_HTTP_PROTO_DECL
explicit
serializer(
rts::polystore& ctx);
capy::polystore& ctx);

/** Reset the serializer for a new message.

Expand Down Expand Up @@ -574,7 +574,7 @@ struct serializer::config
{
/** Enable Brotli Content-Encoding.

Requires `boost::rts::brotli::encode_service` to be
Requires `boost::capy::brotli::encode_service` to be
installed, otherwise an exception is thrown.
*/
bool apply_brotli_encoder = false;
Expand Down Expand Up @@ -668,7 +668,7 @@ struct serializer::config
BOOST_HTTP_PROTO_DECL
void
install_serializer_service(
rts::polystore& ctx,
capy::polystore& ctx,
serializer::config const& cfg);

//------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions src/detail/zlib_filter_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

#include "src/detail/filter.hpp"

#include <boost/rts/zlib/stream.hpp>
#include <boost/rts/zlib/flush.hpp>
#include <boost/capy/zlib/stream.hpp>
#include <boost/capy/zlib/flush.hpp>

namespace boost {
namespace http_proto {
Expand All @@ -35,7 +35,7 @@ class zlib_filter_base : public filter
}

protected:
rts::zlib::stream strm_;
capy::zlib::stream strm_;

static
unsigned int
Expand Down
46 changes: 23 additions & 23 deletions src/parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
#include <boost/buffers/flat_buffer.hpp>
#include <boost/buffers/front.hpp>
#include <boost/buffers/slice.hpp>
#include <boost/rts/brotli/decode.hpp>
#include <boost/rts/polystore.hpp>
#include <boost/rts/zlib/error.hpp>
#include <boost/rts/zlib/inflate.hpp>
#include <boost/capy/brotli/decode.hpp>
#include <boost/capy/polystore.hpp>
#include <boost/capy/zlib/error.hpp>
#include <boost/capy/zlib/inflate.hpp>
#include <boost/url/grammar/ci_string.hpp>
#include <boost/url/grammar/error.hpp>
#include <boost/url/grammar/hexdig_chars.hpp>
Expand Down Expand Up @@ -305,19 +305,19 @@ clamp(
class zlib_filter
: public detail::zlib_filter_base
{
rts::zlib::inflate_service& svc_;
capy::zlib::inflate_service& svc_;

public:
zlib_filter(
const rts::polystore& ctx,
const capy::polystore& ctx,
http_proto::detail::workspace& ws,
int window_bits)
: zlib_filter_base(ws)
, svc_(ctx.get<rts::zlib::inflate_service>())
, svc_(ctx.get<capy::zlib::inflate_service>())
{
system::error_code ec = static_cast<rts::zlib::error>(
system::error_code ec = static_cast<capy::zlib::error>(
svc_.init2(strm_, window_bits));
if(ec != rts::zlib::error::ok)
if(ec != capy::zlib::error::ok)
detail::throw_system_error(ec);
}

Expand All @@ -334,17 +334,17 @@ class zlib_filter
strm_.next_in = static_cast<unsigned char*>(const_cast<void *>(in.data()));
strm_.avail_in = saturate_cast(in.size());

auto rs = static_cast<rts::zlib::error>(
auto rs = static_cast<capy::zlib::error>(
svc_.inflate(
strm_,
more ? rts::zlib::no_flush : rts::zlib::finish));
more ? capy::zlib::no_flush : capy::zlib::finish));

results rv;
rv.out_bytes = saturate_cast(out.size()) - strm_.avail_out;
rv.in_bytes = saturate_cast(in.size()) - strm_.avail_in;
rv.finished = (rs == rts::zlib::error::stream_end);
rv.finished = (rs == capy::zlib::error::stream_end);

if(rs < rts::zlib::error::ok && rs != rts::zlib::error::buf_err)
if(rs < capy::zlib::error::ok && rs != capy::zlib::error::buf_err)
rv.ec = rs;

return rv;
Expand All @@ -354,14 +354,14 @@ class zlib_filter
class brotli_filter
: public detail::brotli_filter_base
{
rts::brotli::decode_service& svc_;
rts::brotli::decoder_state* state_;
capy::brotli::decode_service& svc_;
capy::brotli::decoder_state* state_;

public:
brotli_filter(
const rts::polystore& ctx,
const capy::polystore& ctx,
http_proto::detail::workspace&)
: svc_(ctx.get<rts::brotli::decode_service>())
: svc_(ctx.get<capy::brotli::decode_service>())
{
// TODO: use custom allocator
state_ = svc_.create_instance(nullptr, nullptr, nullptr);
Expand Down Expand Up @@ -401,10 +401,10 @@ class brotli_filter
rv.out_bytes = out.size() - available_out;
rv.finished = svc_.is_finished(state_);

if(!more && rs == rts::brotli::decoder_result::needs_more_input)
if(!more && rs == capy::brotli::decoder_result::needs_more_input)
rv.ec = BOOST_HTTP_PROTO_ERR(error::bad_payload);

if(rs == rts::brotli::decoder_result::error)
if(rs == capy::brotli::decoder_result::error)
rv.ec = BOOST_HTTP_PROTO_ERR(
svc_.get_error_code(state_));

Expand Down Expand Up @@ -505,7 +505,7 @@ class parser_service

void
install_parser_service(
rts::polystore& ctx,
capy::polystore& ctx,
parser::config_base const& cfg)
{
ctx.emplace<parser_service>(cfg);
Expand Down Expand Up @@ -534,7 +534,7 @@ class parser::impl
elastic,
};

const rts::polystore& ctx_;
const capy::polystore& ctx_;
parser_service& svc_;

detail::workspace ws_;
Expand Down Expand Up @@ -567,7 +567,7 @@ class parser::impl
bool chunked_body_ended;

public:
impl(const rts::polystore& ctx, detail::kind k)
impl(const capy::polystore& ctx, detail::kind k)
: ctx_(ctx)
, svc_(ctx.get<parser_service>())
, ws_(svc_.space_needed)
Expand Down Expand Up @@ -1866,7 +1866,7 @@ parser(parser&& other) noexcept

parser::
parser(
rts::polystore& ctx,
capy::polystore& ctx,
detail::kind k)
: impl_(new impl(ctx, k))
{
Expand Down
Loading
Loading