mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Add preliminary support for Boost 1.74
This commit is contained in:
@@ -107,7 +107,11 @@ public:
|
||||
req.target("/");
|
||||
req.version(11);
|
||||
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;
|
||||
jr[jss::method] = cmd;
|
||||
|
||||
@@ -141,13 +141,14 @@ public:
|
||||
{
|
||||
auto const ep = getEndpoint(cfg, v2);
|
||||
stream_.connect(ep);
|
||||
ws_.handshake_ex(
|
||||
ep.address().to_string() + ":" + std::to_string(ep.port()),
|
||||
"/",
|
||||
ws_.set_option(boost::beast::websocket::stream_base::decorator(
|
||||
[&](boost::beast::websocket::request_type& req) {
|
||||
for (auto const& h : headers)
|
||||
req.set(h.first, h.second);
|
||||
});
|
||||
}));
|
||||
ws_.handshake(
|
||||
ep.address().to_string() + ":" + std::to_string(ep.port()),
|
||||
"/");
|
||||
ws_.async_read(
|
||||
rb_,
|
||||
strand_.wrap(std::bind(
|
||||
|
||||
Reference in New Issue
Block a user