Panda3D
 All Classes Functions Variables Enumerations
config_nativenet.cxx
1 // Filename: config_nativenet.cxx
2 // Created by: drose (01Mar07)
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_nativenet.h"
16 
17 #include "socket_ip.h"
18 #include "socket_tcp.h"
19 #include "socket_tcp_listen.h"
20 #include "socket_tcp_ssl.h"
21 #include "socket_udp_incoming.h"
22 #include "socket_udp_outgoing.h"
23 #include "socket_udp.h"
24 #include "socket_portable.h"
25 #include "buffered_datagramconnection.h"
26 #include "pandaSystem.h"
27 
28 #include "dconfig.h"
29 
30 Configure(config_nativenet);
31 NotifyCategoryDef(nativenet, "");
32 
33 ConfigureFn(config_nativenet) {
34  init_libnativenet();
35 }
36 
37 
38 ////////////////////////////////////////////////////////////////////
39 // Function: init_libnativenet
40 // Description: Initializes the library. This must be called at
41 // least once before any of the functions or classes in
42 // this library can be used. Normally it will be
43 // called by the static initializers and need not be
44 // called explicitly, but special cases exist.
45 ////////////////////////////////////////////////////////////////////
46 void
47 init_libnativenet() {
48  static bool initialized = false;
49  if (initialized) {
50  return;
51  }
52  initialized = true;
53 
54  Socket_IP::init_type();
55  Socket_TCP::init_type();
56  Socket_TCP_Listen::init_type();
57 #ifdef HAVE_OPENSSL
58  Socket_TCP_SSL::init_type();
59 #endif
60  Socket_UDP_Incoming::init_type();
61  Socket_UDP_Outgoing::init_type();
62  Socket_UDP::init_type();
63  Buffered_DatagramConnection::init_type();
64 
66  ps->add_system("nativenet");
67 
68  init_network();
69 }
70 
static PandaSystem * get_global_ptr()
Returns the global PandaSystem object.
This class is used as a namespace to group several global properties of Panda.
Definition: pandaSystem.h:29
void add_system(const string &system)
Intended for use by each subsystem to register itself at startup.