Sending data using Sockets
What is the process of sending data using Sockets .
I have made a connection using Socket.Connect()
Now what to do after this ..
Becase when i do something like
The program crashes......
Nokia Developer Expert
what is the error note shown during the crash ?
Also is the aDesc a member variable of the class ?, it should really be, since othervise it could go out-of-scope during the write process.
It is not the member of the class .
I m just passing it as a perimeter in a function .
Okie .. i wil make it a member of the class now .
Hi Yucca now i have made it a member of the class and this is the latest situation ....
this is the code ..........
//in Connect Function
// Connect to the server, asynchronously
iSocket.Connect( iInetAddr, iStatus );
switch ( iRunState )
//User::LeaveIfError(iStatus.Int());// leave on bad return code
_LIT(KSocketConnnectedMessage, "Socket Connected");
and in Send data ffunction
void CConnection::Send(const TDesC8& aDesc)
SetActive(); .\\Leaves here .......
also when i reach the line setActive the connection has not been made.
As i m testing it on a java server where it shows when connected.
But when i m checking iRunState==ESocketConnected
how is it possible that without making the connection it executes the "iSocket.Write(iSndBuffer,iStatus);"