mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-21 03:26:01 +00:00
Add preliminary support for Boost 1.74
This commit is contained in:
@@ -128,6 +128,7 @@ target_include_directories (xrpl_core
|
|||||||
|
|
||||||
target_compile_definitions(xrpl_core
|
target_compile_definitions(xrpl_core
|
||||||
PUBLIC
|
PUBLIC
|
||||||
|
BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT
|
||||||
HAS_UNCAUGHT_EXCEPTIONS=1)
|
HAS_UNCAUGHT_EXCEPTIONS=1)
|
||||||
target_compile_options (xrpl_core
|
target_compile_options (xrpl_core
|
||||||
PUBLIC
|
PUBLIC
|
||||||
|
|||||||
@@ -360,7 +360,11 @@ OverlayImpl::makeRedirectResponse(
|
|||||||
msg.version(request.version());
|
msg.version(request.version());
|
||||||
msg.result(boost::beast::http::status::service_unavailable);
|
msg.result(boost::beast::http::status::service_unavailable);
|
||||||
msg.insert("Server", BuildInfo::getFullVersionString());
|
msg.insert("Server", BuildInfo::getFullVersionString());
|
||||||
msg.insert("Remote-Address", remote_address);
|
{
|
||||||
|
std::ostringstream ostr;
|
||||||
|
ostr << remote_address;
|
||||||
|
msg.insert("Remote-Address", ostr.str());
|
||||||
|
}
|
||||||
msg.insert("Content-Type", "application/json");
|
msg.insert("Content-Type", "application/json");
|
||||||
msg.insert(boost::beast::http::field::connection, "close");
|
msg.insert(boost::beast::http::field::connection, "close");
|
||||||
msg.body() = Json::objectValue;
|
msg.body() = Json::objectValue;
|
||||||
|
|||||||
@@ -198,13 +198,14 @@ BaseWSPeer<Handler, Impl>::run()
|
|||||||
impl().ws_.control_callback(control_callback_);
|
impl().ws_.control_callback(control_callback_);
|
||||||
start_timer();
|
start_timer();
|
||||||
close_on_timer_ = true;
|
close_on_timer_ = true;
|
||||||
impl().ws_.async_accept_ex(
|
impl().ws_.set_option(
|
||||||
request_,
|
boost::beast::websocket::stream_base::decorator([](auto& res) {
|
||||||
[](auto& res) {
|
|
||||||
res.set(
|
res.set(
|
||||||
boost::beast::http::field::server,
|
boost::beast::http::field::server,
|
||||||
BuildInfo::getFullVersionString());
|
BuildInfo::getFullVersionString());
|
||||||
},
|
}));
|
||||||
|
impl().ws_.async_accept(
|
||||||
|
request_,
|
||||||
bind_executor(
|
bind_executor(
|
||||||
strand_,
|
strand_,
|
||||||
std::bind(
|
std::bind(
|
||||||
|
|||||||
@@ -107,7 +107,11 @@ public:
|
|||||||
req.target("/");
|
req.target("/");
|
||||||
req.version(11);
|
req.version(11);
|
||||||
req.insert("Content-Type", "application/json; charset=UTF-8");
|
req.insert("Content-Type", "application/json; charset=UTF-8");
|
||||||
req.insert("Host", ep_);
|
{
|
||||||
|
std::ostringstream ostr;
|
||||||
|
ostr << ep_;
|
||||||
|
req.insert("Host", ostr.str());
|
||||||
|
}
|
||||||
{
|
{
|
||||||
Json::Value jr;
|
Json::Value jr;
|
||||||
jr[jss::method] = cmd;
|
jr[jss::method] = cmd;
|
||||||
|
|||||||
@@ -141,13 +141,14 @@ public:
|
|||||||
{
|
{
|
||||||
auto const ep = getEndpoint(cfg, v2);
|
auto const ep = getEndpoint(cfg, v2);
|
||||||
stream_.connect(ep);
|
stream_.connect(ep);
|
||||||
ws_.handshake_ex(
|
ws_.set_option(boost::beast::websocket::stream_base::decorator(
|
||||||
ep.address().to_string() + ":" + std::to_string(ep.port()),
|
|
||||||
"/",
|
|
||||||
[&](boost::beast::websocket::request_type& req) {
|
[&](boost::beast::websocket::request_type& req) {
|
||||||
for (auto const& h : headers)
|
for (auto const& h : headers)
|
||||||
req.set(h.first, h.second);
|
req.set(h.first, h.second);
|
||||||
});
|
}));
|
||||||
|
ws_.handshake(
|
||||||
|
ep.address().to_string() + ":" + std::to_string(ep.port()),
|
||||||
|
"/");
|
||||||
ws_.async_read(
|
ws_.async_read(
|
||||||
rb_,
|
rb_,
|
||||||
strand_.wrap(std::bind(
|
strand_.wrap(std::bind(
|
||||||
|
|||||||
Reference in New Issue
Block a user