i am working on series60 3660,6600 phones,i got a problem when using RSocket and connecting to SSL enabled site,my socket couln't be able to connect to the server,I am using active object to connect to server,The following code.



TInt KPort=443;
iAddress.SetPort(KPort);

const TUint32 KInetAddr = INET_ADDR(x,x,x,x);//where x's are IP numbers.
iAddress.SetAddress(KInetAddr);

TInt err=iSocket.SetOpt(KSoSecureSocket, KSolInetSSL,KSSLSetSecureStatus);
iSocket.SetOpt(KSoTcpKeepAlive,KSolInetTcp);


if(err == KErrNone)
CEikonEnv::Static()->AlertWin(_L("Enabled"));
else
CEikonEnv::Static()->AlertWin(_L("Not Enabled"));

iSocket.Connect(iAddress,iStatus);
iHttpState=EConnecting;
SetActive();

when i run the program,i am getting the message Enabled means the soket is Secure Socket , But when the code Enters RunL when i check the iStatus i am getting a value of -3(KErrCancel),sometimes -4(KErrNoMemory )(very rare).I don't know where the thing going wrong.please help me out its urgent for me,Thanks in advance for your help.