Panda3D
config_distributed.cxx
1 // Filename: config_distributed.cxx
2 // Created by: drose (19May04)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #include "config_distributed.h"
16 #include "dconfig.h"
17 
18 Configure(config_distributed);
19 NotifyCategoryDef(distributed, "");
20 
21 ConfigureFn(config_distributed) {
22  init_libdistributed();
23 }
24 
25 ConfigVariableInt game_server_timeout_ms
26 ("game-server-timeout-ms", 20000,
27  PRC_DESC("This represents the amount of time to block waiting for the TCP "
28  "connection to the game server. It is only used when the connection "
29  "method is NSPR."));
30 
32 ("min-lag", 0.0,
33  PRC_DESC("This represents the time in seconds by which to artificially lag "
34  "inbound messages. It is useful to test a game's tolerance of "
35  "network latency."));
36 
38 ("max-lag", 0.0,
39  PRC_DESC("This represents the time in seconds by which to artificially lag "
40  "inbound messages. It is useful to test a game's tolerance of "
41  "network latency."));
42 
43 ConfigVariableBool handle_datagrams_internally
44 ("handle-datagrams-internally", true,
45  PRC_DESC("When this is true, certain datagram types can be handled "
46  "directly by the C++ cConnectionRepository implementation, "
47  "for performance reasons. When it is false, all datagrams "
48  "are handled by the Python implementation."));
49 
50 ////////////////////////////////////////////////////////////////////
51 // Function: init_libdistributed
52 // Description: Initializes the library. This must be called at
53 // least once before any of the functions or classes in
54 // this library can be used. Normally it will be
55 // called by the static initializers and need not be
56 // called explicitly, but special cases exist.
57 ////////////////////////////////////////////////////////////////////
58 void
59 init_libdistributed() {
60  static bool initialized = false;
61  if (initialized) {
62  return;
63  }
64  initialized = true;
65 
66 }
67 
This is a convenience class to specialize ConfigVariable as a boolean type.
This is a convenience class to specialize ConfigVariable as a floating-point type.
This is a convenience class to specialize ConfigVariable as an integer type.