Danbias/Code/Game/DanBiasServer/GameServer.h

51 lines
1.2 KiB
C
Raw Normal View History

2013-12-12 09:33:59 +01:00
/////////////////////////////////////////////////////////////////////
// Created by [Dennis Andersen] [2013]
/////////////////////////////////////////////////////////////////////
#ifndef DANBIASSERVER_GAME_SERVER_H
#define DANBIASSERVER_GAME_SERVER_H
2014-01-07 10:26:09 +01:00
#include "DanBiasServerAPI.h"
#include "LobbySessions\MainLobby.h"
2013-12-12 09:33:59 +01:00
#include <NetworkServer.h>
#include <NetworkCallbackHelper.h>
namespace DanBias
{
class GameServer :public Oyster::Network::ClientConnectedObject
{
public:
GameServer();
virtual~GameServer();
2013-12-12 09:33:59 +01:00
DanBiasServerReturn Create();
DanBiasServerReturn Run();
DanBiasServerReturn Release();
static NetworkSession* MainLobbyInstance();
2013-12-12 09:33:59 +01:00
private:
//static void ClientConnectCallbackFunction(Oyster::Network::NetworkClient& connectedClient);
2014-01-07 10:26:09 +01:00
void NetworkCallback(Oyster::Network::NetworkClient* client) override;
2013-12-12 09:33:59 +01:00
bool initiated;
bool running;
bool released;
int maxClients;
MainLobby *mainLobby;
Oyster::Network::NetworkServer *server;
static GameServer* instance;
2013-12-12 09:33:59 +01:00
private:
struct InitData
{
int port;
int clients;
};
bool LoadIniFile(InitData&);
2014-01-07 10:26:09 +01:00
private:
friend class AdminInterface;
2013-12-12 09:33:59 +01:00
};
}// End namspace DanBias
#endif // !DANBIASSERVER_DBSERVER_H