Changeset View
Changeset View
Standalone View
Standalone View
source/network/NetClient.h
Show First 20 Lines • Show All 91 Lines • ▼ Show 20 Lines | public: | ||||
/** | /** | ||||
* Returns the GUID of the local client. | * Returns the GUID of the local client. | ||||
* Used for distinguishing observers. | * Used for distinguishing observers. | ||||
*/ | */ | ||||
CStr GetGUID() const { return m_GUID; } | CStr GetGUID() const { return m_GUID; } | ||||
/** | /** | ||||
* Returns the server name. | |||||
*/ | |||||
CStrW GetServerName() const { return m_ServerName; } | |||||
/** | |||||
* Set up a connection to the remote networked server. | * Set up a connection to the remote networked server. | ||||
* @param server IP address or host name to connect to | * @param server IP address or host name to connect to | ||||
* @return true on success, false on connection failure | * @return true on success, false on connection failure | ||||
*/ | */ | ||||
bool SetupConnection(const CStr& server, const u16 port, ENetHost* enetClient = NULL); | bool SetupConnection(const CStr& server, const u16 port, ENetHost* enetClient = NULL); | ||||
/** | /** | ||||
* Destroy the connection to the server. | * Destroy the connection to the server. | ||||
▲ Show 20 Lines • Show All 138 Lines • ▼ Show 20 Lines | private: | ||||
/** | /** | ||||
* Push a message onto the GUI queue listing the current player assignments. | * Push a message onto the GUI queue listing the current player assignments. | ||||
*/ | */ | ||||
void PostPlayerAssignmentsToScript(); | void PostPlayerAssignmentsToScript(); | ||||
CGame *m_Game; | CGame *m_Game; | ||||
CStrW m_UserName; | CStrW m_UserName; | ||||
CStrW m_ServerName; | |||||
/// Current network session (or NULL if not connected) | /// Current network session (or NULL if not connected) | ||||
CNetClientSession* m_Session; | CNetClientSession* m_Session; | ||||
/// Turn manager associated with the current game (or NULL if we haven't started the game yet) | /// Turn manager associated with the current game (or NULL if we haven't started the game yet) | ||||
CNetClientTurnManager* m_ClientTurnManager; | CNetClientTurnManager* m_ClientTurnManager; | ||||
/// Unique-per-game identifier of this client, used to identify the sender of simulation commands | /// Unique-per-game identifier of this client, used to identify the sender of simulation commands | ||||
Show All 31 Lines |
Wildfire Games · Phabricator