summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2022-03-01 11:44:28 +0100
committer Miodrag Milanovic <mmicko@gmail.com>2022-03-01 11:44:28 +0100
commitef98b0220d4de4535d9bf10dfde536c19afc3517 (patch)
tree9b1ed3359ec1274801c07b10506b67d24d655a28 /src/lib
parentcdcfa1d74abe0d804398fee543a3df55b44c4991 (diff)
Fixes for ASIO 1.20.0
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/util/client_ws.hpp5
-rw-r--r--src/lib/util/client_wss.hpp2
2 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/util/client_ws.hpp b/src/lib/util/client_ws.hpp
index f3c4ded6bb2..8f093d2b132 100644
--- a/src/lib/util/client_ws.hpp
+++ b/src/lib/util/client_ws.hpp
@@ -11,6 +11,7 @@
#include <atomic>
#include <list>
#include "crypto.hpp"
+#include "base64.hpp"
#ifndef CASE_INSENSITIVE_EQUALS_AND_HASH
#define CASE_INSENSITIVE_EQUALS_AND_HASH
@@ -65,7 +66,7 @@ namespace webpp {
unsigned short remote_endpoint_port;
private:
- explicit Connection(socket_type* socket): remote_endpoint_port(0), socket(socket), strand(socket->get_io_context()), closed(false) { }
+ explicit Connection(asio::io_context &context, socket_type* socket): remote_endpoint_port(0), socket(socket), strand(context), closed(false) { }
class SendData {
public:
@@ -488,7 +489,7 @@ namespace webpp {
resolver->async_resolve(query, [this]
(const std::error_code &ec, asio::ip::tcp::resolver::iterator it){
if(!ec) {
- connection=std::shared_ptr<Connection>(new Connection(new WS(*io_context)));
+ connection=std::shared_ptr<Connection>(new Connection(*io_context, new WS(*io_context)));
asio::async_connect(*connection->socket, it, [this]
(const std::error_code &ec, asio::ip::tcp::resolver::iterator /*it*/){
diff --git a/src/lib/util/client_wss.hpp b/src/lib/util/client_wss.hpp
index 6ff51658f30..128394f5f4e 100644
--- a/src/lib/util/client_wss.hpp
+++ b/src/lib/util/client_wss.hpp
@@ -45,7 +45,7 @@ namespace webpp {
resolver->async_resolve(query, [this]
(const std::error_code &ec, asio::ip::tcp::resolver::iterator it){
if(!ec) {
- connection=std::shared_ptr<Connection>(new Connection(new WSS(*io_context, context)));
+ connection=std::shared_ptr<Connection>(new Connection(*io_context, new WSS(*io_context, context)));
asio::async_connect(connection->socket->lowest_layer(), it, [this]
(const std::error_code &ec, asio::ip::tcp::resolver::iterator /*it*/){