do
{
swatch.Reset();
swatch.Start();
try
{
message += reader.ReadString();
Thread.Sleep(tout);
}
catch (Exception)
{
break;
}
p++;
if (p == 32768 / k)
{
swatch.Stop();
time = swatch.Elapsed.Milliseconds * p;
g++;
tout += 2;
writer.Write(time.ToString());
time = p = 0;
message = "";
}
} while (serverSocket.Connected);