Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User qochem's Avatar
    Join Date
    Jun 2003
    Posts
    5
    Hi !

    I am trying to create a TCP Client. I've got an error that I don't undersdand, on line "resolver.GetByName (KURLServeur, result);". Here is the whole code that creates this connexion :

    TInt KPortMesures = 2050;
    _LIT (KURLServeur, "ochem.no-ip.info");

    RSocketServ serv;
    RSocket socket;
    TInetAddr addr;
    RHostResolver resolver;
    TNameEntry result;
    TRequestStatus status;

    User::LeaveIfError (serv.Connect ());
    User::LeaveIfError
    (socket.Open (serv, KAfInet, KSockStream, KProtocolInetTcp));
    User::LeaveIfError
    (resolver.Open (serv, KAfInet, KProtocolInetUdp));

    addr.SetFamily (KAfInet);
    addr.SetPort (KPortMesures);
    resolver.GetByName (KURLServeur, result);
    addr.SetAddress (TInetAddr::Cast(result ().iAddr).Address ());
    socket.Connect (addr, status);


    Maybe should I initiate a GPRS connexion, but how ?

    Regards,

  2. #2
    Registered User LearningCurve's Avatar
    Join Date
    Aug 2003
    Posts
    18
    hi ,

    i quite don't have a clear picture as to wat that error is....but u wudn't need a hostNameResolver if you are going to specify the ip address of remote machine...ie., in the format 10.91.17.258

    ...u can check the sockets example given in the series 60 SDK examples...it's fab...

    and....for all details about TCP/UDP sockets....u can also check the foll...link...

    http://www.symbian.com/developer/tec...s/sockets.html

    adios,
    LearningCurve.

  3. #3
    Registered User oledocmeth's Avatar
    Join Date
    May 2003
    Posts
    24
    In this case look in the IssueRequest and RunL functions

    http://discussion.forum.nokia.com/fo...2798#post62798

  4. #4
    Registered User jackkc7vlo's Avatar
    Join Date
    Jul 2003
    Posts
    5
    I was having a problem with a similar line. The problem ended up being with my RAS connection. When I had a local connection via 2 serial ports I was not getting a DNS address from the PPP negotiation. Try running the socket example and putting in a name instead of an IP address. If it returns a DNS error -18 then you probably have the same problem

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved