[moved] Why emulator is exit while connecting to server.
Hello all,
I try to implement the socket programming which can send data to server. But when I send data to server, server can receive data but my emulator is closed immediately. I try to fix this for a day, I found that I happen because the code that attempt to connect to server like this:
[QUOTE]
User::LeaveIfError(iSocketServ.Connect());
// Open the socket
User::LeaveIfError(iSocket.Open(iSocketServ, KAfInet, KSockStream,KProtocolInetTcp));
[B]//Connect the socket (has problem)
connectInetAddr.SetAddress(KInetAddr);
connectInetAddr.SetPort(2500); //TLS port
iSocket.Connect(connectInetAddr,iStatus);[/B]
iSocket.Close();
iSocketServ.Close();
[/QUOTE]
Please suggest me why it happens and advice another solution to connect server for me
Thanks a lot
Guide
Re: Why emulator is exit while connecting to server.
Make sure to run the emulator process and not your own application. See [URL="http://wiki.forum.nokia.com/index.php/Running_the_emulator_from_Carbide.c%2B%2B"]Running the emulator from Carbide.c++[/URL] to learn about the different way to run your application.
Then do the proper debugging of the code, identify the problem and solve the root cause.