void CEchoWrite::IssueWrite(const TDes &aText)
// Write a data to a stream socket
{
TBuf<2> eolT (_L("\n"));
// Set up buffer
iBuffer.SetLength(0);
iBuffer.Append(aText);
iBuffer.Append(eolT);
iEchoSocket->Write(iBuffer, iStatus);
// Request timeout
iTimer->After(iTimeOut);
SetActive();
iWriteStatus = ESending;
};
I think, you should use .Copy() than .Append(). Because the iBuffer must be TDes8, and the parameter aText is a 16Bit.
something like
Code:
TBuf8<2> eolT (_L8("\n"));
iBuffer.Zero();
iBuffer.Copy(aText);
iBuffer.Append(eolT);
....