Opening a Connection to an IAP

Extended Connection Preferences API can be used by applications to set the preferred Internet Access Point (IAP) prior to establishing a connection.

Specifying IAP ID enables the applications to start a connection to a specific IAP. The application acquires a connection to the requested IAP, regardless of the existing connections.

  1. Connect to socket server .
            RSocketServ ss;
    ss.Connect();
           
  2. Open a RConnection object.
            RConnection conn;
    conn.Open( ss );
           
  3. Create a connection preference list and extended connection preferences object.
            TConnPrefList prefList;
    TExtendedConnPref preferences;
           
  4. Define the IAP using TExtendedConnPref::SetIapId() .
            preferences.SetIapId( 8 );
           
  5. Append extended connection preferences into connection preference list.
            prefList.AppendL( &preferences );
           
  6. Start a connection with connection preferences.
            conn.Start( prefList );
           

The application is connected to the specified IAP.