Panda3D
config_nativenet.cxx
Go to the documentation of this file.
1 /**
2  * PANDA 3D SOFTWARE
3  * Copyright (c) Carnegie Mellon University. All rights reserved.
4  *
5  * All use of this software is subject to the terms of the revised BSD
6  * license. You should have received a copy of this license along
7  * with this source code in a file named "LICENSE."
8  *
9  * @file config_nativenet.cxx
10  * @author drose
11  * @date 2007-03-01
12  */
13 
14 #include "config_nativenet.h"
15 
16 #include "socket_ip.h"
17 #include "socket_tcp.h"
18 #include "socket_tcp_listen.h"
19 #include "socket_tcp_ssl.h"
20 #include "socket_udp_incoming.h"
21 #include "socket_udp_outgoing.h"
22 #include "socket_udp.h"
23 #include "socket_portable.h"
25 #include "pandaSystem.h"
26 
27 #include "dconfig.h"
28 
29 #if !defined(CPPPARSER) && !defined(LINK_ALL_STATIC) && !defined(BUILDING_PANDA_NATIVENET)
30  #error Buildsystem error: BUILDING_PANDA_NATIVENET not defined
31 #endif
32 
33 Configure(config_nativenet);
34 NotifyCategoryDef(nativenet, "");
35 
36 ConfigureFn(config_nativenet) {
38 }
39 
40 
41 /**
42  * Initializes the library. This must be called at least once before any of
43  * the functions or classes in this library can be used. Normally it will be
44  * called by the static initializers and need not be called explicitly, but
45  * special cases exist.
46  */
47 void
49  static bool initialized = false;
50  if (initialized) {
51  return;
52  }
53  initialized = true;
54 
55  Socket_IP::init_type();
56  Socket_TCP::init_type();
57  Socket_TCP_Listen::init_type();
58 #ifdef HAVE_OPENSSL
59  Socket_TCP_SSL::init_type();
60 #endif
61  Socket_UDP_Incoming::init_type();
62  Socket_UDP_Outgoing::init_type();
63  Socket_UDP::init_type();
64  Buffered_DatagramConnection::init_type();
65 
67  ps->add_system("nativenet");
68 
69  init_network();
70 }
config_nativenet.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PandaSystem::get_global_ptr
static PandaSystem * get_global_ptr()
Returns the global PandaSystem object.
Definition: pandaSystem.cxx:442
init_libnativenet
void init_libnativenet()
Initializes the library.
Definition: config_nativenet.cxx:48
PandaSystem
This class is used as a namespace to group several global properties of Panda.
Definition: pandaSystem.h:26
buffered_datagramconnection.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
socket_udp.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PandaSystem::add_system
void add_system(const std::string &system)
Intended for use by each subsystem to register itself at startup.
Definition: pandaSystem.cxx:365
pandaSystem.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
dconfig.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.