#pragma once #include "MinecraftClient.h" #include "ServerStatus.h" #include "Protocol.h" #include "network/IListenerInterface.h" namespace Feather { class ServerProperties; class DedicatedServer final : public Network::IListenerInterface { public: DedicatedServer(ServerProperties* properties); ~DedicatedServer(); void OnClientConnect(Network::TCPClientHandle&& client) override; void OnClientDisconnect(const Network::TCPClientHandle& client) override; ServerStatus& GetStatus() { return m_status; } private: ServerProperties* m_properties; Network::TCPListener m_listener; ServerStatus m_status; Protocol m_protocol; LockableList m_clients; }; }