summaryrefslogtreecommitdiff
path: root/platform/windows/tcp_server_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/tcp_server_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/tcp_server_winsock.cpp')
-rw-r--r--platform/windows/tcp_server_winsock.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/platform/windows/tcp_server_winsock.cpp b/platform/windows/tcp_server_winsock.cpp
index 1aedc52bb9..a4eb3a769c 100644
--- a/platform/windows/tcp_server_winsock.cpp
+++ b/platform/windows/tcp_server_winsock.cpp
@@ -66,7 +66,7 @@ void TCPServerWinsock::cleanup() {
Error TCPServerWinsock::listen(uint16_t p_port, IP_Address::AddrType p_type,const List<String> *p_accepted_hosts) {
int sockfd;
- sockfd = socket(AF_INET, SOCK_STREAM, 0);
+ sockfd = _socket_create(p_type, SOCK_STREAM, IPPROTO_TCP);
ERR_FAIL_COND_V(sockfd == INVALID_SOCKET, FAILED);
unsigned long par = 1;