Changeset View
Changeset View
Standalone View
Standalone View
source/network/NetServer.h
Show First 20 Lines • Show All 128 Lines • ▼ Show 20 Lines | public: | ||||
void UpdateGameAttributes(JS::MutableHandleValue attrs, ScriptInterface& scriptInterface); | void UpdateGameAttributes(JS::MutableHandleValue attrs, ScriptInterface& scriptInterface); | ||||
/** | /** | ||||
* Set the turn length to a fixed value. | * Set the turn length to a fixed value. | ||||
* TODO: we should replace this with some adapative lag-dependent computation. | * TODO: we should replace this with some adapative lag-dependent computation. | ||||
*/ | */ | ||||
void SetTurnLength(u32 msecs); | void SetTurnLength(u32 msecs); | ||||
void SendHolePunchingMessage(const CStr& ip, u16 port); | |||||
leper: `const std::string&` | |||||
Not Done Inline Actionsand most occurances in the file are CStr elexis: and most occurances in the file are CStr | |||||
private: | private: | ||||
CNetServerWorker* m_Worker; | CNetServerWorker* m_Worker; | ||||
}; | }; | ||||
/** | /** | ||||
* 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.) | ||||
▲ Show 20 Lines • Show All 121 Lines • ▼ Show 20 Lines | private: | ||||
void HandleMessageReceive(const CNetMessage* message, CNetServerSession* session); | void HandleMessageReceive(const CNetMessage* message, CNetServerSession* session); | ||||
/** | /** | ||||
* Send a network warning if the connection to a client is being lost or has bad latency. | * Send a network warning if the connection to a client is being lost or has bad latency. | ||||
*/ | */ | ||||
void CheckClientConnections(); | void CheckClientConnections(); | ||||
void SendHolePunchingMessage(const CStr& ip, u16 port); | |||||
Not Done Inline Actionsu16? elexis: u16? | |||||
Not Done Inline Actionsconst std::string& leper: `const std::string&` | |||||
/** | /** | ||||
* Internal script context for (de)serializing script messages, | * Internal script context for (de)serializing script messages, | ||||
* and for storing game attributes. | * and for storing game attributes. | ||||
* (TODO: we shouldn't bother deserializing (except for debug printing of messages), | * (TODO: we shouldn't bother deserializing (except for debug printing of messages), | ||||
* we should just forward messages blindly and efficiently.) | * we should just forward messages blindly and efficiently.) | ||||
*/ | */ | ||||
ScriptInterface* m_ScriptInterface; | ScriptInterface* m_ScriptInterface; | ||||
▲ Show 20 Lines • Show All 81 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
const std::string&