aboutsummaryrefslogtreecommitdiff
path: root/src/socket.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/socket.cpp')
-rw-r--r--src/socket.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/socket.cpp b/src/socket.cpp
index 499ee504e..b159fa14c 100644
--- a/src/socket.cpp
+++ b/src/socket.cpp
@@ -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;
@@ -108,6 +110,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;