|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
|
3 <!-- This component and the accompanying materials are made available under the terms of the License |
|
4 "Eclipse Public License v1.0" which accompanies this distribution, |
|
5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
|
6 <!-- Initial Contributors: |
|
7 Nokia Corporation - initial contribution. |
|
8 Contributors: |
|
9 --> |
|
10 <!DOCTYPE task |
|
11 PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"> |
|
12 <task id="GUID-6822E7FA-D055-5693-8872-8D0E8554A734" xml:lang="en"><title>Configuring |
|
13 the TCP Receive Window</title><shortdesc>How to configure the TCP receive window. </shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody> |
|
14 <prereq id="GUID-C1DA7D2C-54A2-5547-A0E0-52DE599A96FA"><p>Before you start, |
|
15 you must understand the following: </p> <ul> |
|
16 <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> |
|
17 <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> |
|
18 <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> |
|
19 </ul> </prereq> |
|
20 <steps id="GUID-82094A75-1D96-534F-A536-2EFD0521AEFD"> |
|
21 <step id="GUID-0DCC20CB-3465-5CE5-9EB3-96B689EF1CE5"><cmd>To configure the |
|
22 TCP receive window.</cmd> |
|
23 <info><p>The <xref href="GUID-DCF64049-44EA-3EF9-9A80-D364D56670B2.dita"><apiname>CTCPReceiveWindowSize()</apiname></xref> class defines the |
|
24 public interface that the Licensee's NetMcpr must use to configure the TCP |
|
25 receive window. </p></info> |
|
26 </step> |
|
27 <step id="GUID-137AC4D5-F8EC-5B99-9D97-F5710FFBAA8E"><cmd>To set the receive |
|
28 window for different bearers.</cmd> |
|
29 <info>Licensees need to override the <xref href="GUID-5AC853D0-31FB-3944-8769-A59977F616B0.dita"><apiname>SetTcpWin()</apiname></xref> function |
|
30 to set the TCP receive window for different bearers. </info> |
|
31 </step> |
|
32 <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 |
|
33 to set the TCP receive window size.</cmd> |
|
34 <substeps id="GUID-6A7AFF4E-FEB2-5DBA-9514-F8DC9A655CD4"> |
|
35 <substep id="GUID-3938CFE3-7959-5820-B8D2-DF98E6038600"><cmd>To configure |
|
36 the Max TCP receive window size per TCP socket</cmd> |
|
37 <info>If licensees want to configure the Max TCP receive window size per TCP |
|
38 socket, then they must specify a value greater than the Max value configured |
|
39 in the <codeph>tcpip.ini</codeph> file. </info> |
|
40 </substep> |
|
41 <substep id="GUID-E458A87D-EEBC-5B8E-A3B3-3CE46E36A4E8"><cmd>To set the TCP |
|
42 receive Max value uniform across all sockets</cmd> |
|
43 <info>If licensees want to set the TCP receive Max value uniform across all |
|
44 sockets, then they must specify the value in the <codeph>tcpip.ini</codeph> file |
|
45 and set the iMaxWinSize = 0. So, MaxWinSize is always configured from the <codeph>tcpip.ini</codeph> file. </info> |
|
46 </substep> |
|
47 </substeps> |
|
48 </step> |
|
49 <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 |
|
50 to add the pointer to the lookup table.</cmd> |
|
51 <info> The lookup table holds the TCP receive window size for different bearer |
|
52 types. </info> |
|
53 </step> |
|
54 </steps> |
|
55 <example id="GUID-041AB0DF-6C70-57D0-91B2-D37ECD289853"><title>Configuring |
|
56 the TCP receive window example</title> <p>The following code snippet shows |
|
57 how to configure the TCP receive window size: </p> <codeblock id="GUID-20989729-9AF1-5E36-8F19-EDE0D83D42E8" xml:space="preserve"> |
|
58 |
|
59 // Licensees need to override the SetTCPwin() function |
|
60 |
|
61 |
|
62 CNokiaTCPRecvWindow: Public CTCPReceiveWindowSize |
|
63 { |
|
64 public: |
|
65 virtual void SetTCPwin(TUint aBearerType) |
|
66 { |
|
67 //Set iWinSize based on the bearer type |
|
68 |
|
69 // If Licensees want to configure the Max TCP receive window size per TCP socket, |
|
70 // then they must specify a value greater than the max value configured in the tcpip.ini file. |
|
71 |
|
72 // If Licensees want to set the TCP Receive max value uniform across all sockets, |
|
73 // then they must specify the value in the tcpip.ini file and set the iMaxWinSize =0. |
|
74 // So MaxWinSize will always be configured from the tcpip.ini file. |
|
75 |
|
76 } |
|
77 |
|
78 }; |
|
79 |
|
80 |
|
81 CNetworkMetaConnectionProvider::ConstructL() |
|
82 { |
|
83 CTCPReceiveWindowSize * iRecvWIndow = New(ELeave) CNokiaTCpRecvWindow(); |
|
84 //Append the pointer to the lookup table. The Pointer is of the type CTCPReceiveWindowSize. |
|
85 iAccessPointConfig->AppendExtensionL(iReceiveWindow); |
|
86 } |
|
87 |
|
88 </codeblock> </example> |
|
89 </taskbody><related-links> |
|
90 <link href="GUID-8A678AE5-A133-58EA-A4DD-B5BFC94D3AEA.dita"><linktext>Variable |
|
91 TCP Receive Window</linktext></link> |
|
92 </related-links></task> |