123456789101112131415161718192021222324252627 |
- #ifndef GAMESERVER_H
- #define GAMESERVER_H
- #include "server/commands/CommandEditor.h"
- #include "server/commands/ServerCommands.h"
- #include "common/stream/Stream.h"
- #include "server/Clock.h"
- #include "commands/CommandManager.h"
- class GameServer final {
- public:
- GameServer(const Clock& tps);
- void tick();
- void handleCommands(CommandEditor& editor, ServerCommands& serverCommands);
- void onFullServerClientConnect(int socket);
- void onClientConnect(int socket);
- void onClientPackage(int socket, Stream& in);
- void onClientDisconnect(int socket);
- private:
- const Clock& tps;
- CommandManager commandManager;
- };
- #endif
|