mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
Merge pull request #3609 from IvanSavenko/single_process
Allow running server as part of client process
This commit is contained in:
@@ -36,6 +36,7 @@ VCMI_LIB_NAMESPACE_END
|
||||
class CClient;
|
||||
class CBaseForLobbyApply;
|
||||
class GlobalLobbyClient;
|
||||
class IServerRunner;
|
||||
|
||||
class HighScoreCalculation;
|
||||
class HighScoreParameter;
|
||||
@@ -100,17 +101,17 @@ class CServerHandler final : public IServerAPI, public LobbyInfo, public INetwor
|
||||
std::shared_ptr<INetworkConnection> networkConnection;
|
||||
std::unique_ptr<GlobalLobbyClient> lobbyClient;
|
||||
std::unique_ptr<CApplier<CBaseForLobbyApply>> applier;
|
||||
std::unique_ptr<IServerRunner> serverRunner;
|
||||
std::shared_ptr<CMapInfo> mapToStart;
|
||||
std::vector<std::string> localPlayerNames;
|
||||
std::shared_ptr<HighScoreCalculation> highScoreCalc;
|
||||
|
||||
boost::thread threadRunLocalServer;
|
||||
boost::thread threadNetwork;
|
||||
|
||||
std::atomic<EClientState> state;
|
||||
|
||||
void threadRunNetwork();
|
||||
void threadRunServer(bool connectToLobby);
|
||||
void waitForServerShutdown();
|
||||
|
||||
void sendLobbyPack(const CPackForLobby & pack) const override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user