Go to file
Shane Kearns 7b6c3707de sockets: limit buffer size of the internal sockets in proxy engines
The application can normally control the amount of buffering of a
socket or QNetworkReply by using the setReadBufferSize API.
This allows the application to flow control the TCP connection, and
avoids out of memory errors when the data being downloaded is received
faster than the application can process it.

However when using a proxy, the proxy socket engine has an internal
socket which is used to communicate with the proxy server. It is not
visible to the user, and does not have awareness of the buffer size of
the external socket.

To solve this, we limit the internal sockets' buffer size to 64k bytes.
Under normal operation, the data is swiftly copied to the external
socket where the buffer can grow (or not) based on the application's
set value for read buffer size.

Task-number: QT-4966
Reviewed-by: Markus Goetz
(cherry picked from commit c4727a85eed57a4db698326a1bed4aa75b6e5284)

Change-Id: I29e6628e38b79b41c4464ba8cb772a0f03717043
Reviewed-on: http://codereview.qt.nokia.com/153
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Markus Goetz
2011-06-01 13:38:06 +02:00
bin Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
config.profiles Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
config.tests Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
demos Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
dist Added some of my Qt 4.8 changes to the changelog 2011-05-26 14:16:22 +02:00
doc/src Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
examples Use "QT += testlib" consistently 2011-05-27 08:41:00 +02:00
lib Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
mkspecs Made qpluginbase.pri into a feature profile. 2011-05-31 12:51:29 +02:00
qmake Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
src sockets: limit buffer size of the internal sockets in proxy engines 2011-06-01 13:38:06 +02:00
tests Support placing cursor in ligature with mouse or touch 2011-05-30 15:16:34 +02:00
tools Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
util Make lexgen tests compile 2011-05-27 08:41:02 +02:00
.gitattributes Added .tag file with Git revision. 2011-05-03 16:23:49 +02:00
.gitignore Add QT_xxx_VERSION macros for each library in qtbase 2011-05-10 15:15:15 +02:00
.tag Added .tag file with Git revision. 2011-05-03 16:23:49 +02:00
configure Moved certain qmake config variables to .qmake.cache. 2011-05-31 12:51:28 +02:00
configure.exe New configure.exe binary 2011-05-23 09:24:19 -05:00
header.BSD Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
header.FDL Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
header.LGPL Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
header.LGPL-ONLY Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
INSTALL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LGPL_EXCEPTION.txt Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.FDL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.LGPL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.PREVIEW.COMMERCIAL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
qtbase.pro Fixed ordering problem when configuring with `-make <part>' 2011-05-26 11:09:32 +02:00
sync.profile Add QT_xxx_VERSION macros for each library in qtbase 2011-05-10 15:15:15 +02:00