1234567891011121314151617181920212223242526272829303132 |
- #ifndef GAMESERVER_H
- #define GAMESERVER_H
- #include <iostream>
- #include "../network/server/IServerListener.h"
- #include "ICommandSource.h"
- #include "CommandManager.h"
- using namespace std;
- class GameServer : public IServerListener, public ICommandSource
- {
- public:
- GameServer();
- virtual ~GameServer();
-
- void start(unsigned short port, unsigned short maxClients);
-
- void onFullServerClientConnect(int socket) override;
- void onClientConnect(int socket) override;
- void onClientPackage(int socket, Stream& in) override;
- void onClientDisconnect(int socket) override;
-
- void stop();
-
- private:
- bool isRunning = false;
- CommandManager commandManager;
- };
- #endif
|