18#ifndef INCLUDED_NETSERVERTURNMANAGER
19#define INCLUDED_NETSERVERTURNMANAGER
24#include <unordered_map>
The server's end of a network session.
Definition: NetSession.h:155
The server-side counterpart to CNetClientTurnManager.
Definition: NetServerTurnManager.h:38
bool m_HasSyncError
Definition: NetServerTurnManager.h:89
u32 GetReadyTurn()
Returns the latest turn for which all clients are ready; they will have already been told to execute ...
Definition: NetServerTurnManager.h:64
void CheckClientsReady()
Definition: NetServerTurnManager.cpp:75
void NotifyFinishedClientUpdate(CNetServerSession &session, u32 turn, const CStr &hash)
Definition: NetServerTurnManager.cpp:107
std::unordered_map< int, Client > m_ClientsData
Definition: NetServerTurnManager.h:86
std::map< u32, std::map< int, std::string > > m_ClientStateHashes
Definition: NetServerTurnManager.h:92
CNetServerWorker & m_NetServer
Definition: NetServerTurnManager.h:103
u32 GetSavedTurnLength(u32 turn)
Returns the turn length that was used for the given turn.
Definition: NetServerTurnManager.cpp:222
void UninitialiseClient(int client)
Inform the turn manager that a previously-initialised client has left the game.
Definition: NetServerTurnManager.cpp:195
void NotifyFinishedClientCommands(CNetServerSession &session, u32 turn)
Definition: NetServerTurnManager.cpp:48
u32 m_ReadyTurn
The latest turn for which we have received all commands from all clients.
Definition: NetServerTurnManager.h:95
void InitialiseClient(int client, u32 turn, bool observer)
Inform the turn manager of a new client.
Definition: NetServerTurnManager.cpp:184
std::vector< u32 > m_SavedTurnLengths
Definition: NetServerTurnManager.h:101
NONCOPYABLE(CNetServerTurnManager)
CNetServerTurnManager(CNetServerWorker &server)
Definition: NetServerTurnManager.cpp:37
u32 m_TurnLength
Definition: NetServerTurnManager.h:98
void SetTurnLength(u32 msecs)
Definition: NetServerTurnManager.cpp:217
Network server worker thread.
Definition: NetServer.h:213
Definition: NetServerTurnManager.h:76
u32 simulatedTurn
Definition: NetServerTurnManager.h:81
bool isObserver
Definition: NetServerTurnManager.h:82
CStrW playerName
Definition: NetServerTurnManager.h:77
u32 readyTurn
Definition: NetServerTurnManager.h:79
bool isOOS
Definition: NetServerTurnManager.h:83
uint32_t u32
Definition: types.h:39