
Originally Posted by
srivatsan.d
Hi,
I have developed a XMPP client through which i communicate with Open Fire server and able to chat with the persons registered with Open fire server.
When i use Emulator (s60 3rd ed fp-1), the application is working fine continuously with out any connection drop. But when i use my N95, connection is dropped if i am not using for more than 7~10 minutes.
What could be the problem? Why the connection is closed in device and why not in emulator?
Here is my code:
TInt err = iSocketServ.Connect();
User::LeaveIfError(err);
TInt err = iSocket.Open(iSocketServ, KAfInet, KSockStream, KProtocolInetTcp);
User::LeaveIfError(err);
After checking the Addressand resolving
TInt result = iResolver.Open(*(iSocket->SocketServ()), KAfInet,
KProtocolInetTcp);
User::LeaveIfError(result);
iResolver.GetByName(iAddressName, iHostEntry, iStatus);
Connecting
iSocket->Socket()->Connect(iAddr, iStatus);
All the above steps are in Active object.
Then, i am using Write() and RecvOneOrMore() for writing and receiving data respectively.
Any thing i am missing in the above?
Please share your ideas and help me.
Thanks,
Srivatsan D