summaryrefslogtreecommitdiff
path: root/platform/windows/packet_peer_udp_winsock.cpp
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2016-10-28 04:18:17 +0200
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2016-10-30 17:46:05 +0100
commit812908e236e83db368dfef49b8badb9a6182e1de (patch)
tree013cf2b81d6d9bbdca87b9362f2c1abee94b6e74 /platform/windows/packet_peer_udp_winsock.cpp
parentee69bd81cfa67eb5c642604f0f43d711ab370faf (diff)
Fix windows debugger connection problems.
Unify network socket creation between platform. Ensure IPV6_V6ONLY flag is not set on sockets (allow IPv4 connection in IPv6 socket, dual-stack).
Diffstat (limited to 'platform/windows/packet_peer_udp_winsock.cpp')
-rw-r--r--platform/windows/packet_peer_udp_winsock.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/platform/windows/packet_peer_udp_winsock.cpp b/platform/windows/packet_peer_udp_winsock.cpp
index b4cd60979c..6c661db0c7 100644
--- a/platform/windows/packet_peer_udp_winsock.cpp
+++ b/platform/windows/packet_peer_udp_winsock.cpp
@@ -239,11 +239,7 @@ int PacketPeerUDPWinsock::_get_socket(IP_Address::AddrType p_type) {
if (sockfd != -1)
return sockfd;
- int family = p_type == IP_Address::TYPE_IPV6 ? AF_INET6 : AF_INET;
-
- sockfd = socket(family, SOCK_DGRAM, IPPROTO_UDP);
- ERR_FAIL_COND_V( sockfd == -1, -1 );
- //fcntl(sockfd, F_SETFL, O_NONBLOCK);
+ sockfd = _socket_create(p_type, SOCK_DGRAM, IPPROTO_UDP);
return sockfd;
}