IPV6 compatibility

This commit is contained in:
Wenhai Lin
2016-05-19 01:46:01 +08:00
parent c3a3a40af7
commit 033cd4649f
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -391,7 +391,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)
@@ -1774,7 +1774,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
+2 -2
View File
@@ -1,6 +1,6 @@
{
"version":"v3-deps-3",
"zip_file_size":"51659510",
"version":"v3-deps-4",
"zip_file_size":"51525671",
"repo_name":"cocos2d-x-lite-external",
"repo_parent":"https://github.com/WenhaiLin/"
}