Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Apr 2007
    Posts
    3

    Exclamation socket connect error on S60 2.0 SDK

    here is some example code in S60 2.0 SDK HELP Docs:
    RSocketServ ss;
    TRequestStatus status;

    _LIT(KRasAddr,"10.159.24.13");
    const TInt KEchoPort = 7;

    TInetAddr destAddr;
    destAddr.Input(KRasAddr);
    destAddr.SetPort(KEchoPort);

    // Connect to the socket server
    ss.Connect();

    // Open an RConnection object. Note that you must provide the RSocketServ object
    // conn.Open(ss);

    // Create overrides
    TCommDbConnPref prefs
    prefs. SetDialogPreference(ECommDbDialogPrefDoNotPrompt);
    prefs.SetDirection(ECommDbConnectionDirectionOutgoing);
    prefs.SetIapId(4);

    // Start an Outgoing Connection with overrides
    conn.Start(prefs);

    // Open a Host Resolver associated with the connection
    RHostResolver hr;
    hr.Open(ss, KAfInet, KProtocolInetTcp, conn);

    // Open a Socket associated with the connection
    RSocket sock;
    sock.Open(ss, KAfInet, KSockStream, KProtocolInetTcp, conn);

    // Request the Socket to connect to the destination
    sock.Connect(destAddr, status);

    every time the code execute to this line:
    // Start an Outgoing Connection with overrides
    conn.Start(prefs);

    the program will hang at there, can't response any interactive, such as switch to foreground

    can anyone is kind to told me how to connect to internet on S60 2.0 platform(it is on Nokia 6600),exactly 2.0, not 2.1 or upper version.

    pls help me, 3ks.

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,809

    Re: socket connect error on S60 2.0 SDK

    The SDK also says "Explicit Connection Startup"
    Quote Originally Posted by bjtwtx View Post
    prefs.SetIapId(4);
    This line selects the IAP with identifier 4. If you have no IAP with identifier 4 configured - and it is likely the case - that can be a problem.
    Note that it also says: "See TCommDbConnPref for information about how to set up the connection."

    Anyway, these classes are not really documented in the 2nd ed. noFP SDK, so you can consider getting more detailed documentation from the Symbian site (http://developer.symbian.com/main/oslibrary/)
    Last edited by wizard_hu_; 2007-10-15 at 13:36.

Similar Threads

  1. Where is SDK for S60 1st Edition?
    By MDWPPC in forum Mobile Java Tools & SDKs
    Replies: 5
    Last Post: 2007-02-08, 08:04
  2. What is going on with Vibration on S60?
    By amd_rikus in forum Mobile Java General
    Replies: 3
    Last Post: 2006-06-16, 00:29
  3. Does Series60 SDK 2.0 support Socket G card?
    By haidee in forum Bluetooth Technology
    Replies: 3
    Last Post: 2003-11-11, 20:24
  4. Problems about S60 SDK 2.0
    By ouseka in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2003-10-30, 12:28
  5. Almost all tools (S60 MIDP SDK B0.1, Nokia S60 SDK Symbian OS v0.3) Crashes
    By alexandershalamov in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2002-07-03, 13:44

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×