Hi
When I run the attached code I get status='-46' (its mean permission denied), what should I do??
User::LeaveIfError(iSocketServ.Connect());
User::LeaveIfError(iEchoSocket.Open(iSocketServ, KAfInet, KSockStream, KProtocolInetTcp));
TInetAddr iAddress;
iAddress.SetPort(40000);
iAddress.SetAddress(0x0a0a0a5b);
iEchoSocket.Connect(iAddress, iStatus);
SetActive();
are you using UIQ or S60 SDK.
with S60 I think there is no problem but I think that with UIQ SDK you must have some emulator changes!!!
this url may give you some ideas:
SetState( EConnecting );
adress.SetAddress(INET_ADDR(192,168,50,150));
adress.SetPort(5060);
adress.SetFamily( KAfInet );
User::LeaveIfError(socketServ.Connect());
User::LeaveIfError(socket.Open(socketServ, KAfInet,KSockDatagram, KProtocolInetUdp));
socket.Connect(adress,iStatus);
SetActive();
this code is for UDP connection
you can also check chat example in sdk (s60)
goog luck!