Configuring the TCP Receive Window

How to configure the TCP receive window.

Before you start, you must understand the following:

  1. To configure the TCP receive window.

    The CTCPReceiveWindowSize() class defines the public interface that the Licensee's NetMcpr must use to configure the TCP receive window.

  2. To set the receive window for different bearers. Licensees need to override the SetTcpWin() function to set the TCP receive window for different bearers.
  3. Use the SetTCPwin() function to set the TCP receive window size.
    1. To configure the Max TCP receive window size per TCP socket 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.
    2. To set the TCP receive Max value uniform across all sockets 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 is always configured from the tcpip.ini file.
  4. Use the AppendExtensionL() function to add the pointer to the lookup table. The lookup table holds the TCP receive window size for different bearer types.

Configuring the TCP receive window example

The following code snippet shows how to configure the TCP receive window size:



// 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->AppendExtensionL(iReceiveWindow);
}