summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2016-12-01 05:05:44 +0100
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2016-12-09 18:24:59 +0100
commit4d90a4fcd5fcdca42df47062f94a1fa4e5635a94 (patch)
treea6c34254184674d532ce6ec1663ac72f1278426a /platform
parent9200da58e4c2498c833d9f2505600c7049e80940 (diff)
Move V6ONLY flag selection inside helpers
Diffstat (limited to 'platform')
-rw-r--r--platform/windows/packet_peer_udp_winsock.cpp8
-rw-r--r--platform/windows/tcp_server_winsock.cpp8
2 files changed, 0 insertions, 16 deletions
diff --git a/platform/windows/packet_peer_udp_winsock.cpp b/platform/windows/packet_peer_udp_winsock.cpp
index 9a5f6c6a34..4201a3e865 100644
--- a/platform/windows/packet_peer_udp_winsock.cpp
+++ b/platform/windows/packet_peer_udp_winsock.cpp
@@ -119,14 +119,6 @@ Error PacketPeerUDPWinsock::listen(int p_port, int p_recv_buffer_size) {
if (sock == -1 )
return ERR_CANT_CREATE;
- if(ip_type == IP_Address::TYPE_IPV6) {
- // Use IPv6 only socket
- int yes = 1;
- if(setsockopt(sockfd, IPPROTO_IPV6, IPV6_V6ONLY, (const char*)&yes, sizeof(yes)) != 0) {
- WARN_PRINT("Unable to unset IPv4 address mapping over IPv6");
- }
- }
-
struct sockaddr_storage addr = {0};
size_t addr_size = _set_listen_sockaddr(&addr, p_port, ip_type, NULL);
diff --git a/platform/windows/tcp_server_winsock.cpp b/platform/windows/tcp_server_winsock.cpp
index eed03c9b8d..89460eeaa5 100644
--- a/platform/windows/tcp_server_winsock.cpp
+++ b/platform/windows/tcp_server_winsock.cpp
@@ -69,14 +69,6 @@ Error TCPServerWinsock::listen(uint16_t p_port,const List<String> *p_accepted_ho
sockfd = _socket_create(ip_type, SOCK_STREAM, IPPROTO_TCP);
ERR_FAIL_COND_V(sockfd == INVALID_SOCKET, FAILED);
- if(ip_type == IP_Address::TYPE_IPV6) {
- // Use IPv6 only socket
- int yes = 1;
- if(setsockopt(sockfd, IPPROTO_IPV6, IPV6_V6ONLY, (const char*)&yes, sizeof(yes)) != 0) {
- WARN_PRINT("Unable to unset IPv4 address mapping over IPv6");
- }
- }
-
unsigned long par = 1;
if (ioctlsocket(sockfd, FIONBIO, &par)) {
perror("setting non-block mode");