Changeset View
Changeset View
Standalone View
Standalone View
source/network/NetServer.h
Show First 20 Lines • Show All 149 Lines • ▼ Show 20 Lines | public: | ||||
void SetConnectionData(const CStr& ip, u16 port, bool useSTUN); | void SetConnectionData(const CStr& ip, u16 port, bool useSTUN); | ||||
bool GetUseSTUN() const; | bool GetUseSTUN() const; | ||||
CStr GetPublicIp() const; | CStr GetPublicIp() const; | ||||
u16 GetPublicPort() const; | u16 GetPublicPort() const; | ||||
bool CheckPassword(const CStr& password) const; | bool CheckPassword(const CStr& password, const CStr& username) const; | ||||
void SetPassword(const CStr& password); | void SetPassword(const CStr& password); | ||||
private: | private: | ||||
CNetServerWorker* m_Worker; | CNetServerWorker* m_Worker; | ||||
const bool m_LobbyAuth; | const bool m_LobbyAuth; | ||||
bool m_UseSTUN; | bool m_UseSTUN; | ||||
u16 m_PublicPort; | u16 m_PublicPort; | ||||
Show All 37 Lines | |||||
private: | private: | ||||
friend class CNetServer; | friend class CNetServer; | ||||
friend class CNetFileReceiveTask_ServerRejoin; | friend class CNetFileReceiveTask_ServerRejoin; | ||||
CNetServerWorker(bool useLobbyAuth, int autostartPlayers); | CNetServerWorker(bool useLobbyAuth, int autostartPlayers); | ||||
~CNetServerWorker(); | ~CNetServerWorker(); | ||||
bool CheckPassword(const CStr& password, const CStr& username) const; | |||||
void SetPassword(const CStr& hashedPassword); | void SetPassword(const CStr& hashedPassword); | ||||
/** | /** | ||||
* Begin listening for network connections. | * Begin listening for network connections. | ||||
* @return true on success, false on error (e.g. port already in use) | * @return true on success, false on error (e.g. port already in use) | ||||
*/ | */ | ||||
bool SetupConnection(const u16 port); | bool SetupConnection(const u16 port); | ||||
▲ Show 20 Lines • Show All 189 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator