GameServer.h 638 B

123456789101112131415161718192021222324252627
  1. #ifndef GAMESERVER_H
  2. #define GAMESERVER_H
  3. #include "server/commands/ServerCommands.h"
  4. #include "server/network/Client.h"
  5. #include "common/network/Packet.h"
  6. #include "server/Clock.h"
  7. #include "commands/CommandManager.h"
  8. class GameServer final {
  9. public:
  10. GameServer(const Clock& tps);
  11. void tick();
  12. void handleCommands(ServerCommands& serverCommands);
  13. void onFullServerClientConnect(Client& client);
  14. void onClientConnect(Client& client);
  15. void onClientPackage(Client& client, Packet& packet);
  16. void onClientDisconnect(Client& client);
  17. private:
  18. const Clock& tps;
  19. CommandManager commandManager;
  20. };
  21. #endif