Symbian3/SDK/Source/GUID-6822E7FA-D055-5693-8872-8D0E8554A734.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Tue, 20 Jul 2010 12:00:49 +0100
changeset 13 48780e181b38
parent 0 89d6a7a84779
permissions -rw-r--r--
Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE task
  PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="GUID-6822E7FA-D055-5693-8872-8D0E8554A734" xml:lang="en"><title>Configuring
the TCP Receive Window</title><shortdesc>How to configure the TCP receive window. </shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody>
<prereq id="GUID-C1DA7D2C-54A2-5547-A0E0-52DE599A96FA"><p>Before you start,
you must understand the following: </p> <ul>
<li id="GUID-AABAB9C2-A530-53C7-ADBC-9596793B7438"><p> <xref href="GUID-8A678AE5-A133-58EA-A4DD-B5BFC94D3AEA.dita#GUID-8A678AE5-A133-58EA-A4DD-B5BFC94D3AEA/GUID-CDAA0409-6ECB-5ABB-A0E5-F7C5C58E6347">Bearer types</xref>  </p> </li>
<li id="GUID-BC616747-9E4B-52C2-94D0-F99402199698"><p> <xref href="GUID-8A678AE5-A133-58EA-A4DD-B5BFC94D3AEA.dita#GUID-8A678AE5-A133-58EA-A4DD-B5BFC94D3AEA/GUID-E1123CF2-EA87-5F18-8F3C-3FD98DD6ABE8"> Lookup table</xref>  </p> </li>
<li id="GUID-74EA5607-4298-5742-99F4-46222968443B"><p> <xref href="http://www.ietf.org/rfc/rfc1323.txt" scope="external">TCP window scaling</xref>  </p> </li>
</ul> </prereq>
<steps id="GUID-82094A75-1D96-534F-A536-2EFD0521AEFD">
<step id="GUID-0DCC20CB-3465-5CE5-9EB3-96B689EF1CE5"><cmd>To configure the
TCP receive window.</cmd>
<info><p>The <xref href="GUID-DCF64049-44EA-3EF9-9A80-D364D56670B2.dita"><apiname>CTCPReceiveWindowSize()</apiname></xref> class defines the
public interface that the Licensee's NetMcpr must use to configure the TCP
receive window. </p></info>
</step>
<step id="GUID-137AC4D5-F8EC-5B99-9D97-F5710FFBAA8E"><cmd>To set the receive
window for different bearers.</cmd>
<info>Licensees need to override the <xref href="GUID-5AC853D0-31FB-3944-8769-A59977F616B0.dita"><apiname>SetTcpWin()</apiname></xref> function
to set the TCP receive window for different bearers. </info>
</step>
<step id="GUID-966B3D6A-0252-5130-8917-A54B27770D62"><cmd>Use the <xref href="GUID-D3A23EB5-4EBF-3F2C-9EE1-2D93A6094109.dita"><apiname>SetTCPwin()</apiname></xref> function
to set the TCP receive window size.</cmd>
<substeps id="GUID-6A7AFF4E-FEB2-5DBA-9514-F8DC9A655CD4">
<substep id="GUID-3938CFE3-7959-5820-B8D2-DF98E6038600"><cmd>To configure
the Max TCP receive window size per TCP socket</cmd>
<info>If licensees want to configure the Max TCP receive window size per TCP
socket, then they must specify a value greater than the Max value configured
in the <codeph>tcpip.ini</codeph> file. </info>
</substep>
<substep id="GUID-E458A87D-EEBC-5B8E-A3B3-3CE46E36A4E8"><cmd>To set the TCP
receive Max value uniform across all sockets</cmd>
<info>If licensees want to set the TCP receive Max value uniform across all
sockets, then they must specify the value in the <codeph>tcpip.ini</codeph> file
and set the iMaxWinSize = 0. So, MaxWinSize is always configured from the <codeph>tcpip.ini</codeph> file. </info>
</substep>
</substeps>
</step>
<step id="GUID-0C4CC4AB-9198-5EE2-B874-CEC90BAF47C3"><cmd>Use the <xref href="GUID-AB233410-30BD-36D8-A50F-CE669141D083.dita"><apiname>AppendExtensionL()</apiname></xref> function
to add the pointer to the lookup table.</cmd>
<info> The lookup table holds the TCP receive window size for different bearer
types. </info>
</step>
</steps>
<example id="GUID-041AB0DF-6C70-57D0-91B2-D37ECD289853"><title>Configuring
the TCP receive window example</title> <p>The following code snippet shows
how to configure the TCP receive window size: </p> <codeblock id="GUID-20989729-9AF1-5E36-8F19-EDE0D83D42E8" xml:space="preserve">

// Licensees need to override the SetTCPwin() function


CNokiaTCPRecvWindow: Public CTCPReceiveWindowSize
{
  public:
   virtual void SetTCPwin(TUint aBearerType)
    {
       //Set iWinSize  based on the bearer type

    // If Licensees want to configure the Max TCP receive window size per TCP socket, 
    // then they must specify a value greater than the max value configured in the tcpip.ini file.

    // If Licensees want to set the TCP Receive max value uniform across all sockets, 
    // then they must specify the value in the tcpip.ini file and set the iMaxWinSize =0.
    // So MaxWinSize will always be configured from the tcpip.ini file.

    }    
  
};


CNetworkMetaConnectionProvider::ConstructL()
{
CTCPReceiveWindowSize * iRecvWIndow = New(ELeave) CNokiaTCpRecvWindow();
//Append the pointer to the lookup table. The Pointer is of the type CTCPReceiveWindowSize.
iAccessPointConfig-&gt;AppendExtensionL(iReceiveWindow);
}

</codeblock> </example>
</taskbody><related-links>
<link href="GUID-8A678AE5-A133-58EA-A4DD-B5BFC94D3AEA.dita"><linktext>Variable
TCP Receive                 Window</linktext></link>
</related-links></task>