hace lo del while que te puse al principio , ya que i y bytes.Lenght pueden no coincidir, te tenes que asegurar que lo haga antes de decifrarlo
if ((i = stream.Read(bytes, 0, bytes.Length)) != 0)
{
datos = System.Text.Encoding.UTF8.GetString(bytes, 0, i);
return datos;
}
fijate asi
int recibidos=0;int Rcvd;
while (recibidos < bytes.Lenght) {
if ((Rcvd = stream.Read(bytes, recibidos,
bytes.Length - recibidos)) == 0) {
Console.WriteLine("error");
break;
}
datos = System.Text.Encoding.UTF8.GetString(bytes, 0, bytes.Lenght);
return datos;