Symbian3/SDK/Source/GUID-01979029-C009-5FD3-9925-2B7945FB96A6.dita
changeset 8 ae94777fff8f
parent 7 51a74ef9ed63
child 13 48780e181b38
equal deleted inserted replaced
7:51a74ef9ed63 8:ae94777fff8f
     7     Nokia Corporation - initial contribution.
     7     Nokia Corporation - initial contribution.
     8 Contributors: 
     8 Contributors: 
     9 -->
     9 -->
    10 <!DOCTYPE concept
    10 <!DOCTYPE concept
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
    12 <concept xml:lang="en" id="GUID-01979029-C009-5FD3-9925-2B7945FB96A6"><title>Restarting a Network Connection Tutorial</title><shortdesc>This section describes the steps used to start a network connection that was stopped due to contention. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody><section id="GUID-6799E3F3-353E-5C00-A38C-D32F888392AA-GENID-1-8-1-20-1-1-5-1-4-1-5-1-8-1-3-1"><title>Introduction</title> <p>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. </p> </section> <section><title>Introduction</title> <ol id="GUID-409D0186-1BE4-5F7B-999D-0A9FFDED5F14"><li id="GUID-99D5A504-3DE4-59A1-AFC0-A49D13A8B7F5"><p>To terminate the high priority connection on of the following occurs: </p> <ol id="GUID-CF81E2BE-E5E4-5143-AA5C-B0355FB9F9BE"><li id="GUID-E8FE9288-9E3C-58CC-B7AA-435FB1D8DFBF"><p>The Connection Provider (CPR) receives a <codeph>TStopNormal</codeph> message to terminate the process. </p> </li> <li id="GUID-DC6D3CEA-8CD1-5B36-856A-A20AEED6DA0E"><p>The connection remains idle and is automatically terminated. </p> </li> </ol> </li> <li id="GUID-9F56D151-DD81-5706-B82B-3194FA85DAD0"><p>The PDP Tier Manager does the following: </p> <ol id="GUID-E813DD8A-5F6C-5D92-9F99-B596FC7CB8D7"><li id="GUID-6D80A333-6517-5314-B8CA-797AF13D21C3"><p>Indicates to the PDP Meta-Connection Provider (MCPR) of the low priority connection that it can restore the connection. </p> </li> <li id="GUID-D14D495F-5C98-5C80-8A90-50C22806ADC3"><p>The PDP MCPR sends an availability notification to the <codeph>CConnection</codeph> of the low priority connection. </p> </li> </ol> </li> <li id="GUID-AA69E7A9-F16C-5284-9406-C6874569C897"><p> <codeph>CConnection</codeph> of the low priority connection receives the availability notification and uses <xref href="GUID-BED8A733-2ED7-31AD-A911-C1F4707C67FD.dita#GUID-BED8A733-2ED7-31AD-A911-C1F4707C67FD/GUID-C7F27821-BE25-3560-B1A9-74D1A2BB38A9"><apiname>RConnection::Start(TConnPrefList)</apiname></xref> to establish the connection. </p> </li> </ol>  </section> <section><title>Restoring a connection </title> <p>Use the following code to ensure a stopped connection is restored when the higher priority connection has completed. </p> <codeblock id="GUID-92251970-53D1-5DE7-A67E-BC392C43B470" xml:space="preserve">
    12 <concept xml:lang="en" id="GUID-01979029-C009-5FD3-9925-2B7945FB96A6"><title>Restarting a Network Connection Tutorial</title><shortdesc>This section describes the steps used to start a network connection that was stopped due to contention. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody><section id="GUID-6799E3F3-353E-5C00-A38C-D32F888392AA-GENID-1-10-1-21-1-1-5-1-4-1-5-1-8-1-3-1"><title>Introduction</title> <p>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. </p> </section> <section><title>Introduction</title> <ol id="GUID-409D0186-1BE4-5F7B-999D-0A9FFDED5F14"><li id="GUID-99D5A504-3DE4-59A1-AFC0-A49D13A8B7F5"><p>To terminate the high priority connection on of the following occurs: </p> <ol id="GUID-CF81E2BE-E5E4-5143-AA5C-B0355FB9F9BE"><li id="GUID-E8FE9288-9E3C-58CC-B7AA-435FB1D8DFBF"><p>The Connection Provider (CPR) receives a <codeph>TStopNormal</codeph> message to terminate the process. </p> </li> <li id="GUID-DC6D3CEA-8CD1-5B36-856A-A20AEED6DA0E"><p>The connection remains idle and is automatically terminated. </p> </li> </ol> </li> <li id="GUID-9F56D151-DD81-5706-B82B-3194FA85DAD0"><p>The PDP Tier Manager does the following: </p> <ol id="GUID-E813DD8A-5F6C-5D92-9F99-B596FC7CB8D7"><li id="GUID-6D80A333-6517-5314-B8CA-797AF13D21C3"><p>Indicates to the PDP Meta-Connection Provider (MCPR) of the low priority connection that it can restore the connection. </p> </li> <li id="GUID-D14D495F-5C98-5C80-8A90-50C22806ADC3"><p>The PDP MCPR sends an availability notification to the <codeph>CConnection</codeph> of the low priority connection. </p> </li> </ol> </li> <li id="GUID-AA69E7A9-F16C-5284-9406-C6874569C897"><p> <codeph>CConnection</codeph> of the low priority connection receives the availability notification and uses <xref href="GUID-BED8A733-2ED7-31AD-A911-C1F4707C67FD.dita#GUID-BED8A733-2ED7-31AD-A911-C1F4707C67FD/GUID-C7F27821-BE25-3560-B1A9-74D1A2BB38A9"><apiname>RConnection::Start(TConnPrefList)</apiname></xref> to establish the connection. </p> </li> </ol>  </section> <section><title>Restoring a connection </title> <p>Use the following code to ensure a stopped connection is restored when the higher priority connection has completed. </p> <codeblock id="GUID-92251970-53D1-5DE7-A67E-BC392C43B470" xml:space="preserve">
    13 
    13 
    14     TConnPrefList* prefs = TConnPrefList::NewL();
    14     TConnPrefList* prefs = TConnPrefList::NewL();
    15     CleanupStack::PushL(prefs);
    15     CleanupStack::PushL(prefs);
    16     TConnAPPref* APPref = TConnAPPref::NewL(iSnapNumber);
    16     TConnAPPref* APPref = TConnAPPref::NewL(iSnapNumber);
    17     CleanupStack::PushL(APPref);
    17     CleanupStack::PushL(APPref);