×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Jun 2003
    Posts
    5

    Making a TCP Client

    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
    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
    Join Date
    May 2003
    Posts
    24

    See working example

    In this case look in the IssueRequest and RunL functions

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

  4. #4
    Registered User
    Join Date
    Jul 2003
    Posts
    5

    Proper DNS?

    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
  •  
×