|
|
@@ -13,6 +13,25 @@ Configure(config_net);
|
|
|
NotifyCategoryDef(net, "");
|
|
|
|
|
|
ConfigureFn(config_net) {
|
|
|
+ init_libnet();
|
|
|
+}
|
|
|
+
|
|
|
+////////////////////////////////////////////////////////////////////
|
|
|
+// Function: init_libnet
|
|
|
+// Description: Initializes the library. This must be called at
|
|
|
+// least once before any of the functions or classes in
|
|
|
+// this library can be used. Normally it will be
|
|
|
+// called by the static initializers and need not be
|
|
|
+// called explicitly, but special cases exist.
|
|
|
+////////////////////////////////////////////////////////////////////
|
|
|
+void
|
|
|
+init_libnet() {
|
|
|
+ static bool initialized = false;
|
|
|
+ if (initialized) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ initialized = true;
|
|
|
+
|
|
|
NetDatagram::init_type();
|
|
|
}
|
|
|
|