FeatherMC/src/DedicatedServer.h

29 lines
660 B
C++

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