mirror of https://github.com/axmolengine/axmol.git
Merge pull request #15654 from minggo/ipv6-compatibility
Ipv6 compatibility
This commit is contained in:
commit
abe020e808
|
@ -422,7 +422,7 @@ bool Console::listenOnTCP(int port)
|
|||
|
||||
bzero(&hints, sizeof(struct addrinfo));
|
||||
hints.ai_flags = AI_PASSIVE;
|
||||
hints.ai_family = AF_INET; // AF_UNSPEC: Do we need IPv6 ?
|
||||
hints.ai_family = AF_UNSPEC;
|
||||
hints.ai_socktype = SOCK_STREAM;
|
||||
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT)
|
||||
|
|
|
@ -1886,7 +1886,7 @@ static void serverEntryPoint(unsigned int port)
|
|||
struct addrinfo hints, *result = nullptr, *rp = nullptr;
|
||||
int s = 0;
|
||||
memset(&hints, 0, sizeof(struct addrinfo));
|
||||
hints.ai_family = AF_INET; // IPv4
|
||||
hints.ai_family = AF_UNSPEC;
|
||||
hints.ai_socktype = SOCK_STREAM; // TCP stream sockets
|
||||
hints.ai_flags = AI_PASSIVE; // fill in my IP for me
|
||||
|
||||
|
|
Loading…
Reference in New Issue