summaryrefslogtreecommitdiff
path: root/src/net/sdltcpnet.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-09-23 22:01:44 +0300
committerAndrei Karas <akaras@inbox.ru>2016-09-23 22:01:44 +0300
commit3c404128c4669a1f4f190e20a89553677717fc50 (patch)
tree2db4e5031089c800c4e00fd6244e578f44a7c910 /src/net/sdltcpnet.cpp
parent89b267d6d73bbc59f7c313b8a22b97fbb27f99a8 (diff)
downloadplus-3c404128c4669a1f4f190e20a89553677717fc50.tar.gz
plus-3c404128c4669a1f4f190e20a89553677717fc50.tar.bz2
plus-3c404128c4669a1f4f190e20a89553677717fc50.tar.xz
plus-3c404128c4669a1f4f190e20a89553677717fc50.zip
Add missing comments into defines.
Diffstat (limited to 'src/net/sdltcpnet.cpp')
-rw-r--r--src/net/sdltcpnet.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/net/sdltcpnet.cpp b/src/net/sdltcpnet.cpp
index bea2d0e11..3337cd260 100644
--- a/src/net/sdltcpnet.cpp
+++ b/src/net/sdltcpnet.cpp
@@ -28,7 +28,7 @@
#include <netinet/in.h>
#include <netdb.h>
#include <linux/tcp.h>
-#else
+#else // defined(M_TCPOK) && !defined(ANDROID)
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <netdb.h>
@@ -37,9 +37,9 @@
#define TCP_THIN_LINEAR_TIMEOUTS 16
// Fast retrans. after 1 dupack
#define TCP_THIN_DUPACK 17
-#endif
+#endif // defined(M_TCPOK) && !defined(ANDROID)
-#endif
+#endif // defined __linux__ || defined __linux
PRAGMACLANG6(GCC diagnostic push)
PRAGMACLANG6(GCC diagnostic ignored "-Wold-style-cast")
@@ -60,7 +60,9 @@ struct TCPsocketHack final
IPaddress localAddress;
int sflag;
};
-#endif
+#endif // !defined(__native_client__)
+ // && (defined(TCP_THIN_LINEAR_TIMEOUTS)
+ // || defined(TCP_THIN_DUPACK))
void TcpNet::init()
{
@@ -118,18 +120,20 @@ TcpNet::Socket TcpNet::open(IPaddress *const ip)
{
logger->log_r("error on set TCP_THIN_LINEAR_TIMEOUTS");
}
-#endif
+#endif // TCP_THIN_LINEAR_TIMEOUTS
#ifdef TCP_THIN_DUPACK
if (setsockopt(hack->channel, IPPROTO_TCP,
TCP_THIN_DUPACK, &val, sizeof(val)))
{
logger->log_r("error on set TCP_THIN_DUPACK");
}
-#endif
+#endif // TCP_THIN_DUPACK
}
}
}
-#endif
+#endif // !defined(__native_client__)
+ // && (defined(TCP_THIN_LINEAR_TIMEOUTS)
+ // || defined(TCP_THIN_DUPACK))
return sock;
}