#pragma once #include #include #include #include "ProxyServer.hh" #include "ServerState.hh" class ServerShell : public std::enable_shared_from_this { public: class exit_shell : public std::runtime_error { public: exit_shell(); ~exit_shell() = default; }; explicit ServerShell(std::shared_ptr state); ServerShell(const ServerShell&) = delete; ServerShell(ServerShell&&) = delete; ServerShell& operator=(const ServerShell&) = delete; ServerShell& operator=(ServerShell&&) = delete; ~ServerShell(); std::shared_ptr get_proxy_session(const std::string& name); protected: std::shared_ptr state; std::thread th; void thread_fn(); };