diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2017-05-17 17:26:54 -0700 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2017-05-17 17:36:27 -0700 |
commit | ae786098bc58b1ca92f596a698b23aeade9cd2cd (patch) | |
tree | e01c0f83a3c4be084fc6d3775461775b188b914d /src/net.cpp | |
parent | c33652576ce21694b33a94832378f737dd6959fb (diff) | |
parent | ad415bc16afdb4fdb6d619624762f1324751a824 (diff) |
Merge #10061: [net] Added SetSocketNoDelay() utility function
ad415bc [net] Added SetSocketNoDelay() utility function (Thomas Snider)
Tree-SHA512: c19e3c9910b3fc2ef86f2434f3e91d343e9cd9e2116153941de9789e2a6fc0389bffe762d21b55cda4a4b1de993afee0564c6946e65d05cef9e866b58896f9af
Diffstat (limited to 'src/net.cpp')
-rw-r--r-- | src/net.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/net.cpp b/src/net.cpp index dd375e580f..ded6f1099a 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -1071,12 +1071,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) { |