diff options
Diffstat (limited to 'server.h')
-rw-r--r-- | server.h | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -3,6 +3,7 @@ #include <boost/asio/io_context.hpp> #include "config.h" +#include "plugin.h" using namespace std::string_literals; @@ -13,11 +14,19 @@ class Server protected: Config& m_config; boost::asio::io_context& m_ioc; + const Socket& m_socket; + plugins_container_type& m_plugins; public: - Server(Config& config, boost::asio::io_context& ioc); + Server(Config& config, boost::asio::io_context& ioc, const Socket& socket, plugins_container_type& m_plugins); + virtual ~Server(); virtual int start() = 0; + + // Getters + Config& GetConfig(); + const Socket& GetSocket(); + plugin_type GetPlugin(const std::string& name); }; -int server(Config& config); +int run_server(Config& config, plugins_container_type& plugins); |