mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
Client: server port and testing options cleanup
Now we only pass port as ui16 instead of std::string
This commit is contained in:
@@ -48,7 +48,6 @@ public:
|
||||
boost::thread *serverThread; //thread that called system to run server
|
||||
SharedMem *shared; //interprocess memory (for waiting for server)
|
||||
bool verbose; //whether to print log msgs
|
||||
std::string port; //port number in text form
|
||||
|
||||
//functions setting up local server
|
||||
void startServer(); //creates a thread with callServer
|
||||
@@ -56,7 +55,9 @@ public:
|
||||
CConnection * connectToServer(); //connects to server
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
static CConnection * justConnectToServer(const std::string &host = "", const std::string &port = ""); //connects to given host without taking any other actions (like setting up server)
|
||||
static CConnection * justConnectToServer(const std::string &host = "", const ui16 port = 0); //connects to given host without taking any other actions (like setting up server)
|
||||
static ui16 getDefaultPort();
|
||||
static std::string getDefaultPortStr();
|
||||
|
||||
CServerHandler(bool runServer = false);
|
||||
virtual ~CServerHandler();
|
||||
@@ -154,7 +155,7 @@ public:
|
||||
void endGame(bool closeConnection = true);
|
||||
void stopConnection();
|
||||
void save(const std::string & fname);
|
||||
void loadGame(const std::string & fname, const bool server = true, const std::vector<int>& humanplayerindices = std::vector<int>(), const int loadnumplayers = 1, int player_ = -1, const std::string & ipaddr = "", const std::string & port = "");
|
||||
void loadGame(const std::string & fname, const bool server = true, const std::vector<int>& humanplayerindices = std::vector<int>(), const int loadnumplayers = 1, int player_ = -1, const std::string & ipaddr = "", const ui16 port = 0);
|
||||
void run();
|
||||
void campaignMapFinished( std::shared_ptr<CCampaignState> camp );
|
||||
void finishCampaign( std::shared_ptr<CCampaignState> camp );
|
||||
|
||||
Reference in New Issue
Block a user