mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-20 23:52:40 +08:00
IPV6 compatibility
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Vendored
+2
-2
@@ -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/"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user