Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
NetServer.h
Go to the documentation of this file.
1/* Copyright (C) 2024 Wildfire Games.
2 * This file is part of 0 A.D.
3 *
4 * 0 A.D. is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * 0 A.D. is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#ifndef NETSERVER_H
19#define NETSERVER_H
20
21#include "NetFileTransfer.h"
22#include "NetHost.h"
23#include "lib/config2.h"
24#include "lib/types.h"
26
27#include <ctime>
28#include <mutex>
29#include <string>
30#include <utility>
31#include <unordered_map>
32#include <vector>
33#include <thread>
34
37class CFsmEvent;
38class CPlayerAssignmentMessage;
39class CNetStatsTable;
41class ScriptInterface;
42class ScriptRequest;
43
45
47{
48 // We haven't opened the port yet, we're just setting some stuff up.
49 // The worker thread has not been started.
51
52 // The server is open and accepting connections. This is the screen where
53 // rules are set up by the operator and where players join and select civs
54 // and stuff.
56
57 // All the hosts are connected and are loading the game
59
60 // The one with all the killing ;-)
62
63 // The game is over and someone has won. Players might linger to chat or
64 // download the replay log.
66};
67
68/**
69 * Server session representation of client state
70 */
72{
73 // The client has disconnected or been disconnected
75
76 // The client has just connected and we're waiting for its handshake message,
77 // to agree on the protocol version
79
80 // The client has handshook and we're waiting for its lobby authentication message
82
83 // The client has handshook and we're waiting for its authentication message,
84 // to find its name and check its password etc
86
87 // The client has fully joined, and is in the pregame setup stage
88 // or is loading the game.
89 // Server must be in SERVER_STATE_PREGAME or SERVER_STATE_LOADING.
91
92 // The client has authenticated but the game was already started,
93 // so it's synchronising with the game state from other clients
95
96 // The client is running the game.
97 // Server must be in SERVER_STATE_LOADING or SERVER_STATE_INGAME.
99};
100
101/**
102 * Network server interface. Handles all the coordination between players.
103 * One person runs this object, and every player (including the host) connects their CNetClient to it.
104 *
105 * The actual work is performed by CNetServerWorker in a separate thread.
106 */
108{
110public:
111 /**
112 * Construct a new network server.
113 * once this many players are connected (intended for the command-line testing mode).
114 */
115 CNetServer(bool useLobbyAuth = false);
116
117 ~CNetServer();
118
119 /**
120 * Begin listening for network connections.
121 * This function is synchronous (it won't return until the connection is established).
122 * @return true on success, false on error (e.g. port already in use)
123 */
124 bool SetupConnection(const u16 port);
125
126 /**
127 * Call from the GUI to asynchronously notify all clients that they should start loading the game.
128 * UpdateInitAttributes must be called at least once.
129 */
130 void StartGame();
131
132 /**
133 * Call from the GUI to update the game setup attributes.
134 * The changes won't be propagated to clients until game start.
135 * @param attrs init attributes, in the script context of rq
136 */
137 void UpdateInitAttributes(JS::MutableHandleValue attrs, const ScriptRequest& rq);
138
139 /**
140 * Set the turn length to a fixed value.
141 * TODO: we should replace this with some adapative lag-dependent computation.
142 */
143 void SetTurnLength(u32 msecs);
144
145 bool UseLobbyAuth() const;
146
147 void OnLobbyAuth(const CStr& name, const CStr& token);
148
149 void SendHolePunchingMessage(const CStr& ip, u16 port);
150
151 void SetConnectionData(const CStr& ip, u16 port);
153
154 bool GetUseSTUN() const;
155
156 /**
157 * Return the externally accessible IP.
158 */
159 CStr GetPublicIp() const;
160
161 /**
162 * Return the externally accessible port.
163 */
164 u16 GetPublicPort() const;
165
166 /**
167 * Return the serving port on the local machine.
168 */
169 u16 GetLocalPort() const;
170
171 /**
172 * Check if password is valid. If is not, increase number of failed attempts of the lobby user.
173 * This is used without established direct session with the client, to prevent brute force attacks
174 * when guessing password trying to get connection data from the host.
175 * @return true iff password is valid
176 */
177 bool CheckPasswordAndIncrement(const std::string& username, const std::string& password, const std::string& salt);
178
179 /**
180 * Check if user reached certain number of failed attempts.
181 * @see m_BanAfterNumberOfTries
182 * @see CheckPasswordAndBan
183 */
184 bool IsBanned(const std::string& username) const;
185
186 void SetPassword(const CStr& password);
187
188 void SetControllerSecret(const std::string& secret);
189
190private:
192 const bool m_LobbyAuth;
197 std::unordered_map<std::string, int> m_FailedAttempts;
198};
199
200/**
201 * Network server worker thread.
202 * (This is run in a thread so that client/server communication is not delayed
203 * by the host player's framerate - the only delay should be the network latency.)
204 *
205 * Thread-safety:
206 * - SetupConnection and constructor/destructor must be called from the main thread.
207 * - The main thread may push commands onto the Queue members,
208 * while holding the m_WorkerMutex lock.
209 * - Public functions (SendMessage, Broadcast) must be called from the network
210 * server thread.
211 */
213{
215
216public:
217 // Public functions for CNetSession/CNetServerTurnManager to use:
218
219 /**
220 * Send a message to the given network peer.
221 */
222 bool SendMessage(ENetPeer* peer, const CNetMessage* message);
223
224 /**
225 * Disconnects a player from gamesetup or session.
226 */
227 void KickPlayer(const CStrW& playerName, const bool ban);
228
229 /**
230 * Send a message to all clients who match one of the given states.
231 */
232 bool Broadcast(const CNetMessage* message, const std::vector<NetServerSessionState>& targetStates);
233
234private:
235 friend class CNetServer;
236
237 CNetServerWorker(bool useLobbyAuth);
239
240 bool CheckPassword(const std::string& password, const std::string& salt) const;
241
242 void SetPassword(const CStr& hashedPassword);
243
244 void SetControllerSecret(const std::string& secret);
245
246 /**
247 * Begin listening for network connections.
248 * @return true on success, false on error (e.g. port already in use)
249 */
250 bool SetupConnection(const u16 port);
251
252 /**
253 * The given GUID will be (re)assigned to the given player ID.
254 * Any player currently using that ID will be unassigned.
255 */
256 void AssignPlayer(int playerID, const CStr& guid);
257
258 /**
259 * Switch in game mode and notify all clients to start the game.
260 */
261 void StartGame(const CStr& initAttribs);
262
263 /**
264 * Make a player name 'nicer' by limiting the length and removing forbidden characters etc.
265 */
266 static CStrW SanitisePlayerName(const CStrW& original);
267
268 /**
269 * Make a player name unique, if it matches any existing session's name.
270 */
271 CStrW DeduplicatePlayerName(const CStrW& original);
272
273 /**
274 * Get the script context used for init attributes.
275 */
277
278 /**
279 * Set the turn length to a fixed value.
280 * TODO: we should replace this with some adaptive lag-dependent computation.
281 */
282 void SetTurnLength(u32 msecs);
283
284 void ProcessLobbyAuth(const CStr& name, const CStr& token);
285
286 void AddPlayer(const CStr& guid, const CStrW& name);
287 void RemovePlayer(const CStr& guid);
289 void ClearAllPlayerReady();
290
291 void SetupSession(CNetServerSession* session);
292 bool HandleConnect(CNetServerSession* session);
293
294 void OnUserJoin(CNetServerSession* session);
295 void OnUserLeave(CNetServerSession* session);
296
297 static bool OnClientHandshake(CNetServerSession* session, CFsmEvent* event);
298 static bool OnAuthenticate(CNetServerSession* session, CFsmEvent* event);
299 static bool OnSimulationCommand(CNetServerSession* session, CFsmEvent* event);
300 static bool OnSyncCheck(CNetServerSession* session, CFsmEvent* event);
301 static bool OnEndCommandBatch(CNetServerSession* session, CFsmEvent* event);
302 static bool OnChat(CNetServerSession* session, CFsmEvent* event);
303 static bool OnReady(CNetServerSession* session, CFsmEvent* event);
304 static bool OnClearAllReady(CNetServerSession* session, CFsmEvent* event);
305 static bool OnGameSetup(CNetServerSession* session, CFsmEvent* event);
306 static bool OnAssignPlayer(CNetServerSession* session, CFsmEvent* event);
307 static bool OnGameStart(CNetServerSession* session, CFsmEvent* event);
308 static bool OnLoadedGame(CNetServerSession* session, CFsmEvent* event);
309 static bool OnJoinSyncingLoadedGame(CNetServerSession* session, CFsmEvent* event);
310 static bool OnRejoined(CNetServerSession* session, CFsmEvent* event);
311 static bool OnKickPlayer(CNetServerSession* session, CFsmEvent* event);
312 static bool OnDisconnect(CNetServerSession* session, CFsmEvent* event);
313 static bool OnClientPaused(CNetServerSession* session, CFsmEvent* event);
314
315 /**
316 * Checks if all clients have finished loading.
317 * If so informs the clients about that and change the server state.
318 *
319 * Returns if all clients finished loading.
320 */
321 bool CheckGameLoadStatus(CNetServerSession* changedSession);
322
323 void ConstructPlayerAssignmentMessage(CPlayerAssignmentMessage& message);
324
325 void HandleMessageReceive(const CNetMessage* message, CNetServerSession* session);
326
327 /**
328 * Send a network warning if the connection to a client is being lost or has bad latency.
329 */
331
332 void SendHolePunchingMessage(const CStr& ip, u16 port);
333
334 /**
335 * Internal script context for (de)serializing script messages,
336 * and for storing init attributes.
337 * (TODO: we shouldn't bother deserializing (except for debug printing of messages),
338 * we should just forward messages blindly and efficiently.)
339 */
341
343
344 /**
345 * Stores the most current init attributes.
346 * NB: this is not guaranteed to be up-to-date until the server is LOADING or INGAME.
347 * At that point, the settings are frozen and ought to be identical to the simulation Init Attributes.
348 */
349 JS::PersistentRootedValue m_InitAttributes;
350
351 /**
352 * Whether this match requires lobby authentication.
353 */
354 const bool m_LobbyAuth;
355
357 std::vector<CNetServerSession*> m_Sessions;
358
360
362
364
365 std::vector<u32> m_BannedIPs;
366 std::vector<CStrW> m_BannedPlayers;
367
369
370 /**
371 * Holds the GUIDs of all currently paused players.
372 */
373 std::vector<CStr> m_PausingPlayers;
374
376
378
379 /**
380 * The GUID of the client in control of the game (the 'host' from the players' perspective).
381 */
383
384 /**
385 * The 'secret' used to identify the controller of the game.
386 */
388
389 /**
390 * A copy of all simulation commands received so far, indexed by
391 * turn number, to simplify support for rejoining etc.
392 * TODO: verify this doesn't use too much RAM.
393 */
394 std::vector<std::vector<CSimulationMessage>> m_SavedCommands;
395
396 /**
397 * The latest copy of the simulation state, received from an existing
398 * client when a new client has asked to rejoin the game.
399 */
400 std::string m_JoinSyncFile;
401
402 /**
403 * Time when the clients connections were last checked for timeouts and latency.
404 */
406
407private:
408 // Thread-related stuff:
409
410#if CONFIG2_MINIUPNPC
411 /**
412 * Try to find a UPnP root on the network and setup port forwarding.
413 */
414 static void SetupUPnP();
415 std::thread m_UPnPThread;
416#endif
417
418 static void RunThread(CNetServerWorker* data);
419 void Run();
420 bool RunStep();
421
422 std::thread m_WorkerThread;
423 std::mutex m_WorkerMutex;
424
425 // protected by m_WorkerMutex
427
428 // Queues for messages sent by the game thread (protected by m_WorkerMutex):
429 std::vector<bool> m_StartGameQueue;
430 std::vector<std::string> m_InitAttributesQueue;
431 std::vector<std::pair<CStr, CStr>> m_LobbyAuthQueue;
432 std::vector<u32> m_TurnLengthQueue;
433};
434
435/// Global network server for the standard game
436extern CNetServer *g_NetServer;
437
438#endif // NETSERVER_H
struct _ENetHost ENetHost
Definition: NetClient.h:37
Various declarations shared by networking code.
struct _ENetPeer ENetPeer
Definition: NetHost.h:30
std::map< CStr, PlayerAssignment > PlayerAssignmentMap
Definition: NetHost.h:54
CNetServer * g_NetServer
Global network server for the standard game.
Definition: NetServer.cpp:82
NetServerSessionState
Server session representation of client state.
Definition: NetServer.h:72
@ NSS_AUTHENTICATE
Definition: NetServer.h:85
@ NSS_INGAME
Definition: NetServer.h:98
@ NSS_PREGAME
Definition: NetServer.h:90
@ NSS_HANDSHAKE
Definition: NetServer.h:78
@ NSS_LOBBY_AUTHENTICATE
Definition: NetServer.h:81
@ NSS_UNCONNECTED
Definition: NetServer.h:74
@ NSS_JOIN_SYNCING
Definition: NetServer.h:94
NetServerState
Definition: NetServer.h:47
@ SERVER_STATE_INGAME
Definition: NetServer.h:61
@ SERVER_STATE_UNCONNECTED
Definition: NetServer.h:50
@ SERVER_STATE_POSTGAME
Definition: NetServer.h:65
@ SERVER_STATE_PREGAME
Definition: NetServer.h:55
@ SERVER_STATE_LOADING
Definition: NetServer.h:58
Represents a signal in the state machine that a change has occurred.
Definition: FSM.h:33
The base class for all network messages exchanged within the game.
Definition: NetMessage.h:33
The server's end of a network session.
Definition: NetSession.h:155
The server-side counterpart to CNetClientTurnManager.
Definition: NetServerTurnManager.h:38
Network server worker thread.
Definition: NetServer.h:213
void OnUserJoin(CNetServerSession *session)
Definition: NetServer.cpp:698
ScriptInterface * m_ScriptInterface
Internal script context for (de)serializing script messages, and for storing init attributes.
Definition: NetServer.h:340
void SetupSession(CNetServerSession *session)
Definition: NetServer.cpp:641
NONCOPYABLE(CNetServerWorker)
~CNetServerWorker()
Definition: NetServer.cpp:112
static bool OnChat(CNetServerSession *session, CFsmEvent *event)
Definition: NetServer.cpp:1222
static bool OnDisconnect(CNetServerSession *session, CFsmEvent *event)
Definition: NetServer.cpp:1438
std::vector< std::string > m_InitAttributesQueue
Definition: NetServer.h:430
static bool OnGameSetup(CNetServerSession *session, CFsmEvent *event)
Definition: NetServer.cpp:1269
static bool OnSyncCheck(CNetServerSession *session, CFsmEvent *event)
Definition: NetServer.cpp:1197
void SendPlayerAssignments()
Definition: NetServer.cpp:854
static bool OnEndCommandBatch(CNetServerSession *session, CFsmEvent *event)
Definition: NetServer.cpp:1209
u32 m_NextHostID
Definition: NetServer.h:375
CStrW m_ServerName
Definition: NetServer.h:363
std::vector< std::pair< CStr, CStr > > m_LobbyAuthQueue
Definition: NetServer.h:431
void SetPassword(const CStr &hashedPassword)
Definition: NetServer.cpp:147
static bool OnClearAllReady(CNetServerSession *session, CFsmEvent *event)
Definition: NetServer.cpp:1257
bool Broadcast(const CNetMessage *message, const std::vector< NetServerSessionState > &targetStates)
Send a message to all clients who match one of the given states.
Definition: NetServer.cpp:357
static bool OnJoinSyncingLoadedGame(CNetServerSession *session, CFsmEvent *event)
Definition: NetServer.cpp:1348
static bool OnClientPaused(CNetServerSession *session, CFsmEvent *event)
Definition: NetServer.cpp:1449
void StartGame(const CStr &initAttribs)
Switch in game mode and notify all clients to start the game.
Definition: NetServer.cpp:1502
void SetTurnLength(u32 msecs)
Set the turn length to a fixed value.
Definition: NetServer.cpp:866
void Run()
Definition: NetServer.cpp:381
static bool OnKickPlayer(CNetServerSession *session, CFsmEvent *event)
Definition: NetServer.cpp:1424
void OnUserLeave(CNetServerSession *session)
Definition: NetServer.cpp:707
std::vector< u32 > m_BannedIPs
Definition: NetServer.h:365
CNetServerTurnManager * m_ServerTurnManager
Definition: NetServer.h:377
void AddPlayer(const CStr &guid, const CStrW &name)
Definition: NetServer.cpp:722
const bool m_LobbyAuth
Whether this match requires lobby authentication.
Definition: NetServer.h:354
std::vector< CStrW > m_BannedPlayers
Definition: NetServer.h:366
static void RunThread(CNetServerWorker *data)
Definition: NetServer.cpp:374
void SendHolePunchingMessage(const CStr &ip, u16 port)
Definition: NetServer.cpp:1586
static bool OnAssignPlayer(CNetServerSession *session, CFsmEvent *event)
Definition: NetServer.cpp:1292
CStrW DeduplicatePlayerName(const CStrW &original)
Make a player name unique, if it matches any existing session's name.
Definition: NetServer.cpp:1561
CStr m_ControllerGUID
The GUID of the client in control of the game (the 'host' from the players' perspective).
Definition: NetServer.h:382
std::thread m_UPnPThread
Definition: NetServer.h:415
bool CheckGameLoadStatus(CNetServerSession *changedSession)
Checks if all clients have finished loading.
Definition: NetServer.cpp:1485
PlayerAssignmentMap m_PlayerAssignments
Definition: NetServer.h:342
static CStrW SanitisePlayerName(const CStrW &original)
Make a player name 'nicer' by limiting the length and removing forbidden characters etc.
Definition: NetServer.cpp:1539
ENetHost * m_Host
Definition: NetServer.h:356
NetServerState m_State
Definition: NetServer.h:361
static bool OnAuthenticate(CNetServerSession *session, CFsmEvent *event)
Definition: NetServer.cpp:937
static bool OnReady(CNetServerSession *session, CFsmEvent *event)
Definition: NetServer.cpp:1237
std::time_t m_LastConnectionCheck
Time when the clients connections were last checked for timeouts and latency.
Definition: NetServer.h:405
bool SendMessage(ENetPeer *peer, const CNetMessage *message)
Send a message to the given network peer.
Definition: NetServer.cpp:348
void RemovePlayer(const CStr &guid)
Definition: NetServer.cpp:774
bool m_Shutdown
Definition: NetServer.h:426
CNetStatsTable * m_Stats
Definition: NetServer.h:359
bool RunStep()
Definition: NetServer.cpp:406
static bool OnLoadedGame(CNetServerSession *session, CFsmEvent *event)
Definition: NetServer.cpp:1318
std::vector< bool > m_StartGameQueue
Definition: NetServer.h:429
std::vector< u32 > m_TurnLengthQueue
Definition: NetServer.h:432
const ScriptInterface & GetScriptInterface()
Get the script context used for init attributes.
Definition: NetServer.cpp:861
std::mutex m_WorkerMutex
Definition: NetServer.h:423
static bool OnGameStart(CNetServerSession *session, CFsmEvent *event)
Definition: NetServer.cpp:1305
std::thread m_WorkerThread
Definition: NetServer.h:422
void KickPlayer(const CStrW &playerName, const bool ban)
Disconnects a player from gamesetup or session.
Definition: NetServer.cpp:790
void ProcessLobbyAuth(const CStr &name, const CStr &token)
Definition: NetServer.cpp:872
bool SetupConnection(const u16 port)
Begin listening for network connections.
Definition: NetServer.cpp:165
void HandleMessageReceive(const CNetMessage *message, CNetServerSession *session)
Definition: NetServer.cpp:616
static void SetupUPnP()
Try to find a UPnP root on the network and setup port forwarding.
Definition: NetServer.cpp:201
std::vector< std::vector< CSimulationMessage > > m_SavedCommands
A copy of all simulation commands received so far, indexed by turn number, to simplify support for re...
Definition: NetServer.h:394
CNetServerWorker(bool useLobbyAuth)
Definition: NetServer.cpp:98
CStr m_Password
Definition: NetServer.h:368
void ClearAllPlayerReady()
Definition: NetServer.cpp:781
std::vector< CNetServerSession * > m_Sessions
Definition: NetServer.h:357
JS::PersistentRootedValue m_InitAttributes
Stores the most current init attributes.
Definition: NetServer.h:349
void AssignPlayer(int playerID, const CStr &guid)
The given GUID will be (re)assigned to the given player ID.
Definition: NetServer.cpp:822
void SetControllerSecret(const std::string &secret)
Definition: NetServer.cpp:153
std::string m_JoinSyncFile
The latest copy of the simulation state, received from an existing client when a new client has asked...
Definition: NetServer.h:400
void CheckClientConnections()
Send a network warning if the connection to a client is being lost or has bad latency.
Definition: NetServer.cpp:562
std::vector< CStr > m_PausingPlayers
Holds the GUIDs of all currently paused players.
Definition: NetServer.h:373
bool CheckPassword(const std::string &password, const std::string &salt) const
Definition: NetServer.cpp:159
bool HandleConnect(CNetServerSession *session)
Definition: NetServer.cpp:683
static bool OnSimulationCommand(CNetServerSession *session, CFsmEvent *event)
Definition: NetServer.cpp:1160
void ConstructPlayerAssignmentMessage(CPlayerAssignmentMessage &message)
Definition: NetServer.cpp:838
static bool OnClientHandshake(CNetServerSession *session, CFsmEvent *event)
Definition: NetServer.cpp:890
std::string m_ControllerSecret
The 'secret' used to identify the controller of the game.
Definition: NetServer.h:387
static bool OnRejoined(CNetServerSession *session, CFsmEvent *event)
Definition: NetServer.cpp:1400
Network server interface.
Definition: NetServer.h:108
CStr m_PublicIp
Definition: NetServer.h:195
void UpdateInitAttributes(JS::MutableHandleValue attrs, const ScriptRequest &rq)
Call from the GUI to update the game setup attributes.
Definition: NetServer.cpp:1696
void SetPassword(const CStr &password)
Definition: NetServer.cpp:1677
void SetTurnLength(u32 msecs)
Set the turn length to a fixed value.
Definition: NetServer.cpp:1712
u16 GetPublicPort() const
Return the externally accessible port.
Definition: NetServer.cpp:1626
bool GetUseSTUN() const
Definition: NetServer.cpp:1606
CNetServerWorker * m_Worker
Definition: NetServer.h:191
NONCOPYABLE(CNetServer)
u16 GetLocalPort() const
Return the serving port on the local machine.
Definition: NetServer.cpp:1631
void StartGame()
Call from the GUI to asynchronously notify all clients that they should start loading the game.
Definition: NetServer.cpp:1690
bool m_UseSTUN
Definition: NetServer.h:193
void OnLobbyAuth(const CStr &name, const CStr &token)
Definition: NetServer.cpp:1706
bool IsBanned(const std::string &username) const
Check if user reached certain number of failed attempts.
Definition: NetServer.cpp:1671
void SetConnectionData(const CStr &ip, u16 port)
Definition: NetServer.cpp:1639
bool CheckPasswordAndIncrement(const std::string &username, const std::string &password, const std::string &salt)
Check if password is valid.
Definition: NetServer.cpp:1655
bool SetupConnection(const u16 port)
Begin listening for network connections.
Definition: NetServer.cpp:1616
bool SetConnectionDataViaSTUN()
Definition: NetServer.cpp:1646
void SetControllerSecret(const std::string &secret)
Definition: NetServer.cpp:1684
CStr m_Password
Definition: NetServer.h:196
~CNetServer()
Definition: NetServer.cpp:1601
bool UseLobbyAuth() const
Definition: NetServer.cpp:1611
std::unordered_map< std::string, int > m_FailedAttempts
Definition: NetServer.h:197
CNetServer(bool useLobbyAuth=false)
Construct a new network server.
Definition: NetServer.cpp:1595
const bool m_LobbyAuth
Definition: NetServer.h:192
CStr GetPublicIp() const
Return the externally accessible IP.
Definition: NetServer.cpp:1621
void SendHolePunchingMessage(const CStr &ip, u16 port)
Definition: NetServer.cpp:1718
u16 m_PublicPort
Definition: NetServer.h:194
ENet connection statistics profiler table.
Definition: NetStats.h:39
Special message type for simulation commands.
Definition: NetMessage.h:114
Abstraction around a SpiderMonkey JS::Realm.
Definition: ScriptInterface.h:72
Spidermonkey maintains some 'local' state via the JSContext* object.
Definition: ScriptRequest.h:60
uint16_t u16
Definition: types.h:38
uint32_t u32
Definition: types.h:39