Thank u so much.
I solvedmyissue like below
<pre> private void tcpServer1_OnDataAvailable(tcpServer.TcpServerConnection connection)
{
byte[] data = readStream(connection.Socket);
int intIndex;
int startindex=0;
for (intIndex = 0; intIndex < data.Length; intIndex++)
{
if (data[intIndex] == 13)
{
if (data != null)
{
string dataStr = Encoding.ASCII.GetString(data).Substring(startindex,(intIndex-startindex));
invokeDelegate del = () =>
{
logData(false, dataStr);
};
Invoke(del);
startindex = intIndex;
}
}
else
{
}
}
}