Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/source/network/NetServer.h
Show First 20 Lines • Show All 147 Lines • ▼ Show 20 Lines | public: | ||||
void OnLobbyAuth(const CStr& name, const CStr& token); | void OnLobbyAuth(const CStr& name, const CStr& token); | ||||
void SendHolePunchingMessage(const CStr& ip, u16 port); | void SendHolePunchingMessage(const CStr& ip, u16 port); | ||||
void SetConnectionData(const CStr& ip, u16 port, bool useSTUN); | void SetConnectionData(const CStr& ip, u16 port, bool useSTUN); | ||||
bool GetUseSTUN() const; | bool GetUseSTUN() const; | ||||
/** | |||||
* Return the externally accessible IP. | |||||
*/ | |||||
CStr GetPublicIp() const; | CStr GetPublicIp() const; | ||||
/** | |||||
* Return the externally accessible port. | |||||
*/ | |||||
u16 GetPublicPort() const; | u16 GetPublicPort() const; | ||||
/** | /** | ||||
* Return the serving port on the local machine. | |||||
*/ | |||||
u16 GetLocalPort() const; | |||||
/** | |||||
* Check if password is valid. If is not, increase number of failed attempts of the lobby user. | * Check if password is valid. If is not, increase number of failed attempts of the lobby user. | ||||
* This is used without established direct session with the client, to prevent brute force attacks | * This is used without established direct session with the client, to prevent brute force attacks | ||||
* when guessing password trying to get connection data from the host. | * when guessing password trying to get connection data from the host. | ||||
* @return true iff password is valid | * @return true iff password is valid | ||||
*/ | */ | ||||
bool CheckPasswordAndIncrement(const CStr& password, const std::string& username); | bool CheckPasswordAndIncrement(const CStr& password, const std::string& username); | ||||
/** | /** | ||||
▲ Show 20 Lines • Show All 260 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator