diff options
author | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2010-03-05 02:10:19 (GMT) |
---|---|---|
committer | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2010-03-05 03:34:33 (GMT) |
commit | 92c624b6e26cf950ca651cee59be8ab53ada9a7d (patch) | |
tree | b79048d0af50b5b7304a8c66d0a439164ac2e2c9 /src/network/bearer | |
parent | 445ae84fbd7d5ef04a426f8c32a79a369fed70eb (diff) | |
download | Qt-92c624b6e26cf950ca651cee59be8ab53ada9a7d.zip Qt-92c624b6e26cf950ca651cee59be8ab53ada9a7d.tar.gz Qt-92c624b6e26cf950ca651cee59be8ab53ada9a7d.tar.bz2 |
Don't keep polling network sessions open indefinitely.
Diffstat (limited to 'src/network/bearer')
-rw-r--r-- | src/network/bearer/qnetworksession.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/network/bearer/qnetworksession.cpp b/src/network/bearer/qnetworksession.cpp index f0d7ede..27922af 100644 --- a/src/network/bearer/qnetworksession.cpp +++ b/src/network/bearer/qnetworksession.cpp @@ -492,6 +492,20 @@ QString QNetworkSession::errorString() const \o Setting this property to \i true before calling \l open() implies that the connection attempt is made but if no connection can be established, the user is not connsulted and asked to select a suitable connection. This property is not set by default and support for it depends on the platform. + + \row + \o AutoCloseSessionTimeout + \o If the session requires polling to keep its state up to date, this property holds + the timeout in milliseconds before the session will automatically close. If the + value of this property is -1 the session will not automatically close. This property + is set to -1 by default. + + The purpose of this property is to minimize resource use on platforms that use + polling to update the state of the session. Applications can set the value of this + property to the desired timeout before the session is closed. In response to the + closed() signal the network session should be deleted to ensure that all polling is + stopped. The session can then be recreated once it is required again. This property + has no effect for sessions that do not require polling. \endtable */ QVariant QNetworkSession::sessionProperty(const QString& key) const |