mirror of
https://github.com/holub/mame
synced 2025-06-03 03:16:30 +03:00
Fixes for ASIO 1.20.0
This commit is contained in:
parent
cdcfa1d74a
commit
ef98b0220d
@ -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*/){
|
||||
|
@ -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*/){
|
||||
|
Loading…
Reference in New Issue
Block a user