1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

local game connects to 127.0.0.1 instead of localhost (windows returns an ipv6 address sometimes which is not supported)

This commit is contained in:
Perttu Ahola 2011-02-08 11:24:07 +02:00
parent 15f27a1937
commit b0971f4459
6 changed files with 30 additions and 9 deletions

View 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;
@ -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;