28 lines
683 B
C++
28 lines
683 B
C++
#pragma once
|
|
|
|
#include "network/TCPListener.h"
|
|
#include "network/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;
|
|
Network::ServerStatus m_status;
|
|
|
|
LockableList<Network::TCPClient> m_clients;
|
|
};
|
|
}
|