Making a TCP Client
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");
User::LeaveIfError (serv.Connect ());
(socket.Open (serv, KAfInet, KSockStream, KProtocolInetTcp));
(resolver.Open (serv, KAfInet, KProtocolInetUdp));
resolver.GetByName (KURLServeur, result);
addr.SetAddress (TInetAddr::Cast(result ().iAddr).Address ());
socket.Connect (addr, status);
Maybe should I initiate a GPRS connexion, but how ?
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...
See working example
In this case look in the IssueRequest and RunL functions
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