private string streamReadLine( Stream inputStream )
{
int next_char;
string data = "";
while (true)
{
next_char = inputStream.ReadByte();
if (next_char == '\n')
{
break;
}
if (next_char == '\r')
{
continue;
}
if (next_char == -1)
{
Thread.Sleep( 1 );
continue;
}
;
data += Convert.ToChar( next_char );
}
return data;
}