GameServer.h 576 B

12345678910111213141516171819202122232425
  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. class GameServer final {
  8. public:
  9. GameServer(const Clock& tps);
  10. void tick();
  11. void handleCommands(CommandEditor& editor, ServerCommands& serverCommands);
  12. void onFullServerClientConnect(int socket);
  13. void onClientConnect(int socket);
  14. void onClientPackage(int socket, Stream& in);
  15. void onClientDisconnect(int socket);
  16. private:
  17. const Clock& tps;
  18. };
  19. #endif