]> git.lizzy.rs Git - minetest.git/blobdiff - src/socket.cpp
removed furnace menu because it is not needed anymore
[minetest.git] / src / socket.cpp
index 499ee504e0d7e33c3c793577a5f040b2971a8486..ab3ca62c58d6ee90ee1dc050c92dd7207a9daedd 100644 (file)
@@ -26,7 +26,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "utility.h"
 
 // Debug printing options
+// Set to 1 for debug output
 #define DP 0
+// This is prepended to everything printed here
 #define DPS ""
 
 bool g_sockets_initialized = false;
@@ -51,6 +53,8 @@ void sockets_cleanup()
 
 Address::Address()
 {
+       m_address = 0;
+       m_port = 0;
 }
 
 Address::Address(unsigned int address, unsigned short port)
@@ -108,6 +112,12 @@ void Address::setAddress(unsigned int address)
        m_address = address;
 }
 
+void Address::setAddress(unsigned int a, unsigned int b,
+               unsigned int c, unsigned int d)
+{
+       m_address = (a<<24) | (b<<16) | ( c<<8) | d;
+}
+
 void Address::setPort(unsigned short port)
 {
        m_port = port;