summaryrefslogtreecommitdiffstats
path: root/src/network/socket
Commit message (Collapse)AuthorAgeFilesLines
* sockets: limit buffer size of the internal sockets in proxy enginesShane Kearns2011-06-012-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Update licenseheader text in source files for qtbase Qt moduleJyri Tahtela2011-05-2435-595/+595
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Sockets: Fix potential null pointer usagesShane Kearns2011-05-112-8/+13
| | | | | | | | | QAbstractSocketEngine::createSocketEngine can return 0 as well as throw. In two cases the pointer was being used before the null check, in a 3rd case the null check was missing. Reviewed-by: Markus Goetz (cherry picked from commit 19edac88af53eea7f733cabbaee77f9b725b7ea9)
* Optimisation - buffer packet read in pendingDatagramSizeShane Kearns2011-05-112-9/+56
| | | | | | | | | | | | | | | | | | In Symbian, the OS function to get the size of a pending datagram also includes the size of the packet header (which is different for IPv4 and IPv6). We were reading the datagram with the "peek" flag set to implement pendingDatagramSize, then reading again normally when the client called read/readDatagram. This change removes the "peek" flag, and buffers the datagram in the socket engine, returning it and clearing the buffer when read or readDatagram is called. If there is no buffered data, the existing code path is followed - it isn't mandatory to call pendingDatagramSize before reading from the socket. Reviewed-by: Markus Goetz (cherry picked from commit dd8de4c2437397748daba49569cbc7f89a8bfbee)
* Remove warnings when disabling notifications on a closed socketShane Kearns2011-05-111-6/+1
| | | | | | | | | | | The generic layer calls setReadNotificationEnabled(false) on sockets after they are closed. This no longer causes a warning from the symbian socket engine. A warning will only be emitted if trying to enable notifications on a closed socket. Task-number: QTBUG-18713 Reviewed-by: Markus Goetz (cherry picked from commit 0aa780235c24ed724fcf6a9095a6467e34b9346e)
* Send User-Agent from the network request in http proxy CONNECT commandShane Kearns2011-05-092-1/+11
| | | | | | | | | | | | | Some proxies can discriminate based on the User-Agent when sent a CONNECT command for establishing a HTTPS connection. With this change, if the User-Agent header is set in the QNetworkRequest then it will be passed to the http socket engine for use in the connect command sent to the proxy. As before, "Mozilla/5.0" will be used by default when no user agent has been set. Task-number: QTBUG-17223 Reviewed-by: Markus Goetz
* Fix error handling in write for socks socket engineShane Kearns2011-05-091-1/+6
| | | | | | | | When socks socket engine calls the write function of the native socket engine, it now propagates errors to the abstract socket. Task-number: QTBUG-18713 Reviewed-by: Markus Goetz
* QAbstractSocket: Fix waitForReadyRead infinite loop.Martin Petersson2011-05-021-2/+2
| | | | | | | | Make sure that waitForReadyRead times out if the read buffer is full. Task-number: QTBUG-16123 Reviewed-by: Peter Hartmann (cherry picked from commit 8d4cd52b6981a4e6deea7fdb77f56e40c4f3e6ba)
* Initial import from the monolithic Qt.Qt by Nokia2011-04-2736-0/+18935
This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the Qt Git wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://qt.gitorious.org/qt/pages/GitIntroductionWithQt If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, Qt master branch, at commit 896db169ea224deb96c59ce8af800d019de63f12