Changeset View
Changeset View
Standalone View
Standalone View
source/network/NetServer.h
Show First 20 Lines • Show All 141 Lines • ▼ Show 20 Lines | public: | ||||
void SetTurnLength(u32 msecs); | void SetTurnLength(u32 msecs); | ||||
bool UseLobbyAuth() const; | bool UseLobbyAuth() const; | ||||
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); | |||||
bool GetUseSTUN() const; | |||||
CStr GetPublicIp() const; | |||||
Silier: merge with above | |||||
Done Inline ActionsBreaks with no PCH I believe; (You do not have the include) Stan: Breaks with no PCH I believe; (You do not have the include) | |||||
vladislavbelovUnsubmitted Not Done Inline ActionsNo need to copy the string. vladislavbelov: No need to copy the string. | |||||
u16 GetPublicPort() const; | |||||
bool CheckPassword(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; | |||||
u16 m_PublicPort; | |||||
CStr m_PublicIp; | |||||
CStr m_Password; | |||||
}; | }; | ||||
Done Inline ActionsI don't quite get why we need to store this in there CNetServer too. wraitii: I don't quite get why we need to store this in there CNetServer too. | |||||
Done Inline ActionsNot quite following your question. Which part specificly. Silier: Not quite following your question. Which part specificly. | |||||
Done Inline ActionsK, I had misread that this came from JS in parts. It seems like m_IpSTUN could be queried on demand, but perhaps that's not a good idea then. wraitii: K, I had misread that this came from JS in parts.
It seems like m_IpSTUN could be queried on… | |||||
/** | /** | ||||
* Network server worker thread. | * Network server worker thread. | ||||
* (This is run in a thread so that client/server communication is not delayed | * (This is run in a thread so that client/server communication is not delayed | ||||
* by the host player's framerate - the only delay should be the network latency.) | * by the host player's framerate - the only delay should be the network latency.) | ||||
* | * | ||||
* Thread-safety: | * Thread-safety: | ||||
* - SetupConnection and constructor/destructor must be called from the main thread. | * - SetupConnection and constructor/destructor must be called from the main thread. | ||||
▲ Show 20 Lines • Show All 227 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
merge with above