Use executors with implicit strand

This commit is contained in:
badaix 2021-09-11 23:12:31 +02:00
parent fc4e863b84
commit ffa742c49f
18 changed files with 124 additions and 138 deletions

View file

@ -1,6 +1,6 @@
/***
This file is part of snapcast
Copyright (C) 2014-2020 Johannes Pohl
Copyright (C) 2014-2021 Johannes Pohl
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -40,7 +40,7 @@ class ControlSessionWebsocket : public ControlSession
{
public:
/// ctor. Received message from the client are passed to ControlMessageReceiver
ControlSessionWebsocket(ControlMessageReceiver* receiver, boost::asio::io_context& ioc, websocket::stream<beast::tcp_stream>&& socket);
ControlSessionWebsocket(ControlMessageReceiver* receiver, websocket::stream<beast::tcp_stream>&& socket);
~ControlSessionWebsocket() override;
void start() override;
void stop() override;
@ -58,7 +58,7 @@ protected:
protected:
beast::flat_buffer buffer_;
boost::asio::io_context::strand strand_;
net::strand<net::any_io_executor> strand_;
std::deque<std::string> messages_;
};