summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorMarkus Goetz <Markus.Goetz@nokia.com>2010-02-23 09:25:38 (GMT)
committerMarkus Goetz <Markus.Goetz@nokia.com>2010-02-24 10:14:32 (GMT)
commit12b5619d3cf58a4f8479a796f900f8c946368079 (patch)
tree25166025c10ba0fc029d1b28e7c9fc9a496073be /src/network
parent95633f67f1f8ae4a9ddcc47e718fc250d00922ec (diff)
downloadQt-12b5619d3cf58a4f8479a796f900f8c946368079.zip
Qt-12b5619d3cf58a4f8479a796f900f8c946368079.tar.gz
Qt-12b5619d3cf58a4f8479a796f900f8c946368079.tar.bz2
QNetworkAccessManager: Documentation enhancements
Reviewed-by: Peter Hartmann Reviewed-by: David Boddie
Diffstat (limited to 'src/network')
-rw-r--r--src/network/access/qnetworkaccessmanager.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp
index 0b32533..03b7192 100644
--- a/src/network/access/qnetworkaccessmanager.cpp
+++ b/src/network/access/qnetworkaccessmanager.cpp
@@ -107,7 +107,8 @@ static void ensureInitialized()
object, which holds the common configuration and settings for the requests
it sends. It contains the proxy and cache configuration, as well as the
signals related to such issues, and reply signals that can be used to
- monitor the progress of a network operation.
+ monitor the progress of a network operation. One QNetworkAccessManager
+ should be enough for the whole Qt application.
Once a QNetworkAccessManager object has been created, the application can
use it to send requests over the network. A group of standard functions
@@ -118,6 +119,7 @@ static void ensureInitialized()
A simple download off the network could be accomplished with:
\snippet doc/src/snippets/code/src_network_access_qnetworkaccessmanager.cpp 0
+ QNetworkAccessManager has an asynchronous API.
When the \tt replyFinished slot above is called, the parameter it
takes is the QNetworkReply object containing the downloaded data
as well as meta-data (headers, etc.).
@@ -127,6 +129,11 @@ static void ensureInitialized()
delete it inside the slot connected to finished(). You can use the
deleteLater() function.
+ \note QNetworkAccessManager queues the requests it receives. The number
+ of requests executed in parallel is dependent on the protocol.
+ Currently, for the HTTP protocol on desktop platforms, 6 requests are
+ executed in parallel for one host/port combination.
+
A more involved example, assuming the manager is already existent,
can be:
\snippet doc/src/snippets/code/src_network_access_qnetworkaccessmanager.cpp 1