thanks for being interested in my post,
yes, you are completely right. I have changed thoes variables to global but it was not my problem.
keep in mind that using automatic variables with asynchronous calls is recipe for disaste
After some time spent on my code, application and log thoes are things which i have figured out.
Each time when i was resolving my iServerAddress in TNameEntry i received resolved addres of Family 2048 which represents v4 address family
But after using WAP access point recolver has started returning TNameEntry of Family 2054 which represents v6 address family.
That is why my application started returning KErrBadName because syntax of this family address is different than my socket expected.
Here starts my questions:
I m resolving in address in this way:
if connection using this iNameEntry fails i try to iResolver.Next(iNameEntry, iStatus);
res = iResolver.Open(iSocketServer, KAfInet, KProtocolInetTcp,
res = iResolver.Open(iSocketServer, KAfInet, KProtocolInetTcp);
iState = EResolvingName;
iResolver.GetByName(iAddress2, iNameEntry, iStatus);
1 )My question is how it is possible that my code if i use normal gprs access point i get in iNameEntry v4 familly and when i try to connect using WAP accesspoint any next attemp using normal gprs access point my resolver starts returning iNameEntry v6 familly? If i reboot mobile and try my application with normal gprs ap it works properly.
It looks like using WAP accesspoint change something in device DNS
2) is it possible to flush devices DNS ?
While starting connection i m opening socket in the following way:
where iProtocolInfo i receive
User::LeaveIfError(iSocket.Open(iSocketServer, iProtocolInfo.iAddrFamily ,iProtocolInfo.iSockType,
While KTCPText is tcp for example iProtocolInfo.iAddrFamily is 2048 what represents v4 address family
3) what should be my KTCPText to receive iProtocolInfo which will return me all the parameters needed for v6 address family connection?
Thanks in advance