Refactor web server (#667)

Fixs #674
This commit is contained in:
cyan317
2023-06-08 13:25:49 +01:00
committed by GitHub
parent 9836e4ceaf
commit 435db339df
35 changed files with 2857 additions and 1789 deletions

View File

@@ -27,7 +27,9 @@
#include <boost/asio/spawn.hpp>
#include <boost/json/value.hpp>
class WsBase;
namespace Server {
struct ConnectionBase;
}
class SubscriptionManager;
namespace RPC {
@@ -68,7 +70,7 @@ struct Context
// TODO: we shall change yield_context to const yield_context after we
// update backend interfaces to use const& yield
std::reference_wrapper<boost::asio::yield_context> yield;
std::shared_ptr<WsBase> session;
std::shared_ptr<Server::ConnectionBase> session;
bool isAdmin = false;
std::string clientIp;
};