GameServer.h 648 B

123456789101112131415161718192021222324252627
  1. #ifndef GAMESERVER_H
  2. #define GAMESERVER_H
  3. #include "server/commands/CommandEditor.h"
  4. #include "server/commands/ServerCommands.h"
  5. #include "common/stream/Stream.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(CommandEditor& editor, ServerCommands& serverCommands);
  13. void onFullServerClientConnect(int socket);
  14. void onClientConnect(int socket);
  15. void onClientPackage(int socket, Stream& in);
  16. void onClientDisconnect(int socket);
  17. private:
  18. const Clock& tps;
  19. CommandManager commandManager;
  20. };
  21. #endif