This section describes the steps used to start a network connection that was stopped due to contention.
A low priority connection is terminated when a contention issue occurs and the incoming connection has a higher priority. The low priority connection can be restarted when the higher priority connection is complete. For example, if an always-on Internet connection is terminated to enable the user to send an MMS, the Internet connection is restarted when the message is sent.
The following steps outline describe how to restore a low priority connection when the higher priority connection is finished.
To terminate the high priority connection one of the following occurs:
The PDP Tier Manager does the following:
CConnection
of the low priority connection receives the availability notification
and uses RConnection::Start()
to establish
the connection.
Use the following code to ensure a stopped connection is restored when the higher priority connection has completed.
TConnPrefList* prefs = TConnPrefList::NewL(); CleanupStack::PushL(prefs); TConnAPPref* APPref = TConnAPPref::NewL(iSnapNumber); CleanupStack::PushL(APPref); TConnAutoStartPref* autoPref = TConnAutoStartPref::NewL(); CleanupStack::PushL(autoPref); prefs->AppendL(APPref); prefs->AppendL(autoPref); error = iConnection->Start(*prefs); //Synchronous start. // For asynchronous variant iConnection->Start(*iPrefs, iStatus), you need to // store “prefs” as a class member and delete them in RunL . delete APPref; delete autoPref; prefs->Remove(0); prefs->Remove(0); delete prefs;