aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
diff options
context:
space:
mode:
authorThomas Snider <tjps636@gmail.com>2017-03-22 22:02:02 -0700
committerThomas Snider <tjps636@gmail.com>2017-04-05 11:31:43 -0700
commitad415bc16afdb4fdb6d619624762f1324751a824 (patch)
treef36dd6aa64fa7e498e60195008922e3a9c883f0c /src/net.cpp
parent02d64bd929c9663ba38e96721c6dbd89972d043d (diff)
downloadbitcoin-ad415bc16afdb4fdb6d619624762f1324751a824.tar.xz
[net] Added SetSocketNoDelay() utility function
Diffstat (limited to 'src/net.cpp')
-rw-r--r--src/net.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/net.cpp b/src/net.cpp
index 4c5b04b785..d8629667b5 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1069,12 +1069,7 @@ void CConnman::AcceptConnection(const ListenSocket& hListenSocket) {
// According to the internet TCP_NODELAY is not carried into accepted sockets
// on all platforms. Set it again here just to be sure.
- int set = 1;
-#ifdef WIN32
- setsockopt(hSocket, IPPROTO_TCP, TCP_NODELAY, (const char*)&set, sizeof(int));
-#else
- setsockopt(hSocket, IPPROTO_TCP, TCP_NODELAY, (void*)&set, sizeof(int));
-#endif
+ SetSocketNoDelay(hSocket);
if (IsBanned(addr) && !whitelisted)
{