Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/source/network/NetClient.h
Show First 20 Lines • Show All 97 Lines • ▼ Show 20 Lines | public: | ||||
void SetHostJID(const CStr& jid); | void SetHostJID(const CStr& jid); | ||||
void SetControllerSecret(const std::string& secret); | void SetControllerSecret(const std::string& secret); | ||||
bool IsController() const { return m_IsController; } | bool IsController() const { return m_IsController; } | ||||
/** | /** | ||||
* Set the game password. | * Set the game password. | ||||
* Must be called after SetUserName, as that is used to hash further. | |||||
*/ | */ | ||||
void SetGamePassword(const CStr& hashedPassword); | void SetGamePassword(const CStr& hashedPassword); | ||||
/** | /** | ||||
* 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; } | ||||
/** | /** | ||||
* Set connection data to the remote networked server. | * Set connection data to the remote networked server. | ||||
* @param address IP address or host name to connect to | * @param address IP address or host name to connect to | ||||
*/ | */ | ||||
void SetupServerData(CStr address, u16 port, bool stun); | void SetupServerData(CStr address, u16 port, bool stun); | ||||
/** | /** | ||||
* Set up a connection to the remote networked server. | * Set up a connection to the remote networked server. | ||||
* Must call SetupServerData first. | * Must call SetupServerData first. | ||||
* @return true on success, false on connection failure | * @return true on success, false on connection failure | ||||
*/ | */ | ||||
bool SetupConnection(ENetHost* enetClient); | bool SetupConnection(ENetHost* enetClient); | ||||
/** | /** | ||||
* Request connection information over the lobby. | |||||
*/ | |||||
void SetupConnectionViaLobby(); | |||||
/** | |||||
* Connect to the remote networked server using lobby. | * Connect to the remote networked server using lobby. | ||||
* Push netstatus messages on failure. | * Push netstatus messages on failure. | ||||
* @return true on success, false on connection failure | * @return true on success, false on connection failure | ||||
*/ | */ | ||||
bool TryToConnect(const CStr& hostJID); | bool TryToConnect(const CStr& hostJID); | ||||
/** | /** | ||||
* Destroy the connection to the server. | * Destroy the connection to the server. | ||||
▲ Show 20 Lines • Show All 212 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator