From b0971f4459fd37813dd4779f2ddaf9b38cf5f776 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Tue, 8 Feb 2011 11:24:07 +0200 Subject: local game connects to 127.0.0.1 instead of localhost (windows returns an ipv6 address sometimes which is not supported) --- src/socket.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/socket.cpp') 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; -- cgit v1.2.3