Hi,
I used the "S60Ex\WebClient" sample as the basis for some http code I'm adding to an application. Subsequently my application started generating "CONE 36" [Open handles were found during application shutdown] on exit in the emulator. I'm using S60_3rd_FP1 SDK. After sometime spent trying to isolate the cause of the error, I tested the WebClient sample and realised it was suffering from the same issue.
Googling the problem revealed: http://discussion.forum.nokia.com/fo...ad.php?t=76778.
As a result I modified my code to look like:
Is this the cononical way to create an HTTP session? If so is there any decent documentation describing this mad mess of code?Code:RHTTPSession iSession; RHTTPTransaction iTransaction; RSocketServ iSocketServ; RConnection iConnection; . . . User::LeaveIfError(iSocketServ.Connect()); User::LeaveIfError(iConnection.Open(iSocketServ)); User::LeaveIfError(iConnection.Start()); iSession.OpenL(); RStringPool stringPool = iSession.StringPool(); RHTTPConnectionInfo connInfo = iSession.ConnectionInfo(); connInfo.SetPropertyL(stringPool.StringF(HTTP::EHttpSocketServ, RHTTPSession::GetTable()), THTTPHdrVal(iSocketServ.Handle())); TInt connPtr = reinterpret_cast<TInt>(&iConnection); connInfo.SetPropertyL(stringPool.StringF(HTTP::EHttpSocketConnection, RHTTPSession::GetTable()), THTTPHdrVal(connPtr)); . . . iTransaction.SubmitL(); . . . iTransaction.Close(); iSession.Close(); iConnection.Close(); iSocketServ.Close();
I've noticed that iConnection.Start() blocks for a couple of seconds. Any idea why? I could convert to the asynchronous form, but I'd like to know if there is a way to reduce the delay.
Can someone from Symbian/Nokia make sure the WebClient sample is "CONE 36" free and save future developers potential confusion.
Thanks in advance
Nick





