summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Goetz <Markus.Goetz@nokia.com>2010-03-23 08:37:27 (GMT)
committerMarkus Goetz <Markus.Goetz@nokia.com>2010-03-23 12:07:23 (GMT)
commitc1b524dd8b7a7207d10c33b454519d717349ac6c (patch)
treee92d42961d314b0010492fa997288bf562ea0bcd
parent8ca52f2a9de95ff475537517c7ee965f70ca8aa6 (diff)
downloadQt-c1b524dd8b7a7207d10c33b454519d717349ac6c.zip
Qt-c1b524dd8b7a7207d10c33b454519d717349ac6c.tar.gz
Qt-c1b524dd8b7a7207d10c33b454519d717349ac6c.tar.bz2
QNAM HTTP: Do not use TCP_NODELAY
Reviewed-by: thiago
-rw-r--r--src/network/access/qhttpnetworkconnectionchannel.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp
index 1d8224c..82bc14f 100644
--- a/src/network/access/qhttpnetworkconnectionchannel.cpp
+++ b/src/network/access/qhttpnetworkconnectionchannel.cpp
@@ -865,7 +865,14 @@ void QHttpNetworkConnectionChannel::_q_disconnected()
void QHttpNetworkConnectionChannel::_q_connected()
{
// improve performance since we get the request sent by the kernel ASAP
- socket->setSocketOption(QAbstractSocket::LowDelayOption, 1);
+ //socket->setSocketOption(QAbstractSocket::LowDelayOption, 1);
+ // We have this commented out now. It did not have the effect we wanted. If we want to
+ // do this properly, Qt has to combine multiple HTTP requests into one buffer
+ // and send this to the kernel in one syscall and then the kernel immediately sends
+ // it as one TCP packet because of TCP_NODELAY.
+ // However, this code is currently not in Qt, so we rely on the kernel combining
+ // the requests into one TCP packet.
+
// not sure yet if it helps, but it makes sense
socket->setSocketOption(QAbstractSocket::KeepAliveOption, 1);