summaryrefslogtreecommitdiff
path: root/src/SocketCore.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-01-15 23:17:21 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-01-15 23:17:21 +0900
commitbf4ea63a6692719344580dc33fd9113506d0027c (patch)
tree1dc0936a9c6609aefc87147f7cd09b33552bec93 /src/SocketCore.cc
parente6b027468567e7005170ba9ef7d7bc0ac67d031b (diff)
Disable TCP_NODELAY for BitTorrent
To make Request messages more often packed into 1 packet.
Diffstat (limited to 'src/SocketCore.cc')
-rw-r--r--src/SocketCore.cc2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/SocketCore.cc b/src/SocketCore.cc
index e18ed912..55c97d08 100644
--- a/src/SocketCore.cc
+++ b/src/SocketCore.cc
@@ -369,7 +369,6 @@ SharedHandle<SocketCore> SocketCore::acceptConnection() const
}
SharedHandle<SocketCore> sock(new SocketCore(fd, sockType_));
sock->setNonBlockingMode();
- sock->setTcpNodelay(true);
return sock;
}
@@ -462,7 +461,6 @@ void SocketCore::establishConnection(const std::string& host, uint16_t port)
sockfd_ = fd;
// make socket non-blocking mode
setNonBlockingMode();
- setTcpNodelay(true);
if(connect(fd, rp->ai_addr, rp->ai_addrlen) == -1 &&
SOCKET_ERRNO != A2_EINPROGRESS) {
errNum = SOCKET_ERRNO;